Answers for "sql get only unique rows"

SQL
1

sql unique rows

SELECT
DISTINCT country
FROM City;
Posted by: Guest on February-07-2022
1

select only unique values from and to current table

INSERT INTO Table2(Id) SELECT DISTINCT Id FROM Table1 WHERE Id NOT IN(SELECT Id FROM Table2);
Posted by: Guest on May-01-2021
0

How to select only the first rows for each unique value of a sql tablecolumn?

SELECT
    CName, MIN(AddressLine)
FROM
    MyTable
GROUP BY
    CName
Posted by: Guest on September-05-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language