I have a smallint field that have some record have null values in that field. so when I use % in select only records have any values in that field are displayed.
I want to ask is there any other wild card character I can use to display all records including the ones have nulls ? or I have to use or is null ?
You can use COALESCE function to replace NULLs with some predefined value. For example:
SELECT * FROM my_table WHERE COALESCE(my_field, -1) = some_value