Reputation: 59
i have data like this
ID Nu name
1 234 asd
2 566 asd
3 - sdf
4 356 sd
5 NULL sfsg
now how to get all data with - and null values
Upvotes: 0
Views: 45
Reputation: 4192
To get all the info from the table you can use the following query:
select * from table_name;
To filter by null and dash values, try the where clause:
select * from table_name where nu is null;
UNION ALL
select * from table_name where nu = '-';
Upvotes: 0
Reputation: 86
select * from table_name;
this will give you all the data with - and null value
if you want to fetch only the data where nu is null and -
use this:
select *
from table_name
where nu is null or nu = '-';
I think this should help.
Upvotes: 2