SQLTeam.com | Weblogs | Forums

Display NULL values in a query

#1

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

#2

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?
Pasi.

1 Like
#3

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

#4

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

#5

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.