123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|640|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> Sql null

Fri, 19 Jan 2007, 09:35
ingenium1
how can i use the "null" attr. in a select order?
i.e. Select * From table

-=-=-
Roger Federer is go(o)d.
But he is not alone.

Just relax... sometimes there's no need to argue.
Fri, 19 Jan 2007, 09:55
Jayenkai
Does NULL not work? ie
SELECT * FROM `table` WHERE `field`=NULL

If not, then try using SELECT * FROM `table` WHERE `field`='NULL' or maybe even SELECT * FROM `table` WHERE `field`='' or as a last chance, SELECT * FROM `table` WHERE `field`=0
Other than that, no idea
If none of those have worked my suggestion (if this is essential) would be to add an extra field, named "IsNull", and manually keep track of whether the main field is null or not.

-=-=-
''Load, Next List!''
Fri, 19 Jan 2007, 10:00
ingenium1
i didn't explain my problem properly
i want to use two select instructions:
select * from table1 union all select * from table2
a friend of mine told me that it won't work if those tables don't have the same number of columns... so he told me to use the null attr... but he didn't tell me where to put it...
O_o...

-=-=-
Roger Federer is go(o)d.
But he is not alone.

Just relax... sometimes there's no need to argue.
Fri, 19 Jan 2007, 14:28
Stealth
What about...

SELECT * FROM 'table' WHERE 'field'=''

-=-=-
Quit posting and try Google.