for example
SELECT * FROM movies WHERE director=*
No, you will need to use the LIKE operator and the wildcard%:
SELECT * FROM movies WHERE director like '%';
You can use LIKE;
SELECT * FROM movies WHERE director LIKE '%' --all SELECT * FROM movies WHERE director LIKE 'john landis' --exact SELECT * FROM movies WHERE director LIKE 'steve%berg' --with wildcard
WHERE director like '%'
this is the syntax
For this you need to use LIKE and wildcards:
LIKE
select * from movies where director like '%'
If you are looking for results with ANY director, you can simply leave the WHERE director= completely.
WHERE director=
If you want to do a partial match, you can do a WHERE director like '%Lucas%' , which will return the equivalent of *LUCAS* .
WHERE director like '%Lucas%'
*LUCAS*
If you are looking for the director represented by * , you will have to enclose it between single quotes:
*
SELECT * FROM movies WHERE director='*'
If you are looking for any director, just leave where .
where
This will NOT return every row: rows with the null directive will be omitted (at least with MSSQL).