Log in

View Full Version : Need help with an SQL question on my homework


Quizy
10-13-2011, 03:06 PM
Anyone know the answer to this ? Thanks in advance.


3. You have a Table “TaxPayer” with the values below. Write a SQL query that finds all records where the id column is NULL. What would the output be?
-------------------------
Name | id
Alex | 111
Bertha| 231
Bill | NULL
Chris | NULL
Lauren| 634
-----------------------

nilbog
10-13-2011, 03:10 PM
"all records" = whole row?

in mysql :

select * from taxpayer where id is null

bill null
chris null

Quizy
10-13-2011, 03:22 PM
"all records" = whole row?

in mysql :

select * from taxpayer where id is null

bill null
chris null

thanks nilbog.. thats what i thought as well.. just learning all this right now.. i appreciate the help