Answer Posted / muhammadrashidmughal
select *
from table
where date between '01/01/2003' and '12-31-2008'
or
today is 09-08-2008
select *
from table
where year(date)=year(getdate)-5 and month(date)= '08' and
day(date) ='09'
or
select *
from table
where date >='09-08-2003'
and date<='09-08-2008'
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Which is better statement or preparedstatement?
How to recompile stored procedure at run time?
Give me any three differences between Truncate and Delete.
Explain error and transaction handling in sql server?
What is the recovery model? List the types of recovery model available in sql server?
What is a user-defined function in the sql server and what is its advantage?
Why would you use sql agent?
What are the types of ssrs?
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
What is 2nf normalization form?
What happens if the update subquery returns multiple rows in ms sql server?
How to edit table in sql server 2017?
What are user-defined functions (udfs) in sql server?
What is the difference between Normalization and De-normalization?
How to find out what is the default collation in a database?