How to get number of days in a given year?
Answers were Sorted based on User's Feedback
declare @y int;
set @y = 2016;
SELECT DATEDIFF(day,cast(@y as char(4)), cast(@y+1 as char(4))) Days
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / dinesh rathod
would like to get the total number of days in a year left from the given
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pulak
select add_months(trunc(sysdate,'year'),12)-trunc(sysdate,'year') as days from dual;
Is This Answer Correct ? | 1 Yes | 3 No |
What are extended events in sql server?
What is sql server agent and what are the two modes of authentication in sql server?
What is a with(nolock)?
1.what is the difference between view and cursor? 2.If we do any change in view will it affect the database,similarly when we do changes in cursor will it affect the databse?with certain example?Thanks
Explain transaction server explicit transaction?
What is the datatype returned by count(*)
22 Answers 247Customer, Asian CERC,
What are the advantages of sql stored procedure?
What are the common performance issues in sql server?
can an automatic recovery be initiated by a user? : Sql server administration
What is a self join in sql server?
What is the use of keyword with encryption. Create a store procedure with encryption?
How to declare a cursor with "declare ... Cursor" in ms sql server?