Search
 
SCRIPT & CODE EXAMPLE
 

SQL

SQL SERVER ORDER BY DATE NULL LAST

ORDER BY 
   IIF(Next_Contact_Date IS NULL, 1, 0),
   Next_Contact_Date;
Comment

sql server order by nulls last

SELECT *FROM creditCardORDER BY CASE WHEN monthlyLimit IS NULL THEN 1 ELSE 0 END DESC, monthlyLimit DESC;
Comment

PREVIOUS NEXT
Code Example
Sql :: how to find all children of a record with only parent ID in sql 
Sql :: list table columns mysql 
Sql :: sequence postgresql 
Sql :: how to select random rows from table 
Sql :: replace text in sql 
Sql :: mysql function 
Sql :: sql convert datetime 
Sql :: t_sql contains 
Sql :: find all tables with column name 
Sql :: odd record sql query 
Sql :: how to run a function in sql 
Sql :: NVL() Functions 
Sql :: delete top 10 rows in sql 
Sql :: postgresql if else endif 
Sql :: postgres default value 
Sql :: mysql default value 
Sql :: sql string function update replace 
Sql :: sqlite3 pragma foreign keys 
Sql :: postgressum when 
Sql :: sql values to array of objects 
Sql :: auto increment in postgresql 
Sql :: sql example query 
Sql :: SQL print multiple variable 
Sql :: sqlite commands 
Sql :: mysqli inner join (php) 
Sql :: redo files log oracle 
Sql :: mysql concat and use as where column 
Sql :: oracle grant directory 
Sql :: mysql two joins 
Sql :: split string and get first and last element in sql server 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =