Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

I have a table such as:
========
STUDENT
========
Column 1: ID (interger)
Column 2: Birthday (datetime)


Now, I would create a View from STUDENT table with condition such as:
If Birthday is null, View display that value is 01/01/1900

====================
Create View vSTUDENT As
Select
st.ID,
st.Birthday ???
From STUDENT st
===============================

Please help me
Thanks
Posted

 
Share this answer
 
SQL
Create View vSTUDENT As
Select
st.ID,
ISNULL(st.Birthday,'01/01/1900') AS BirthDate
From STUDENT st


Thanks,
Mamun
 
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