SQLTeam.com | Weblogs | Forums

Display NULL values in a query


when we do select * from table how does the null value display? starting of the result or towards the end of the result?


If you have any NULL values in your columns/rows within your table, it will display NULL. not sure what you mean by starting or end of result?

1 Like

I mean rows with 'null values display first' or ' non null values display first'?


By default, NULL will sort before / ahead of all other values.


Note that, by default, nothing is ordered at all and values can appear anywhere. If you want things sorted, you MUST include an Order By clause.