Skip to content

How to SUM two fields within an SQL query

I need to get the total of two fields which are within the same row and input that number in a field at the end of that same row. This is my code. Is this what the SUM function is used for, or can you only use the SUM function for getting the total of a column? Thanks Answer SUM

Text to List in SQL

Is there any way on how to convert a comma separated text value to a list so that I can use it with ‘IN’ in SQL? I used PostgreSQL for this one. Ex.: This query: produces ‘SG’,’PH’ I wanted to produce this query: Nothing returned when I executed the first query. The table h…

Parent – child sql query with in a single table

I’ve a table: Id | Name | ParentID I want to select records whose parentid not equal to zero, with parent record(parent record have parentid = 0, but some parent record don’t have child record I …