Click here to Skip to main content
15,884,080 members
Please Sign up or sign in to vote.
3.40/5 (2 votes)
Like giving default value as NULL while inserting column from another table .. ?
Posted
Comments
Taha Akhtar 15-Jan-14 5:56am    
isnull(yourcoulmn,yourvalue)

Use IsNull or Coalesce to set defaults for when a value is null. Use Case.. when... else... end where you want to set defaults based on existing non null values.

Ask a question with sample code in order to be given back working code.
 
Share this answer
 
Comments
Maciej Los 15-Jan-14 18:29pm    
+5
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900