SELECT 3 FROM nums;
will return 6 records consisting of number "3".
SELECT id FROM nums;
will return all ids from the table (6 records).
SELECT num FROM nums WHERE num IS NOT NULL;
will return 6 records.
SELECT COUNT(DISTINCT id) FROM nums;
will return 1 record containing "3" in it.
SELECT DISTINCT id FROM nums WHERE num IS NOT NULL;
will return only 2 records.
Login in to like
Login in to comment