Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
display all names from employee table whose DOB in 1/01/1988 and 31/08/1988
Posted
Comments
Hemant Singh Rautela 18-Jul-13 3:52am    
Between is used for a range But and is use for a logical operator which check only condition is true of false...
AND one important thing is that for this your DOB column should be datetime
and pass the correct foramt of date

SQL
Select Name From Employee Where DOB Between '1988-01-01' and '1988-08-31'

Refer this links for reference:
http://msdn.microsoft.com/en-us/library/ms189822.aspx[^]
http://msdn.microsoft.com/en-us/library/ms187922.aspx[^]
http://msdn.microsoft.com/en-us/library/ms186724.aspx[^]
 
Share this answer
 
v3
Thanx... Raja Sekhar S...i was confused using btwn "" and '
 
Share this answer
 
Comments
Raja Sekhar S 18-Jul-13 3:38am    
You cannot add comment as a Solution.....
so add it as a comment and delete it as solution....
if u got the solution... accept it as 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