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 |
How to find the latest updated value in a table without sending any parameters to that query
What is the difference between having and where clause?
What is side by side migration in sql server?
What are the dis_advantages of stored procedures, triggers, indexes?
Can you explain various data region available in ssrs with their use?
Why can there be only one clustered index and not more than one?
What is resultset concur_updatable?
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?
What information is maintained within the msdb database?
You want to check the syntax of a complicated update sql statement without executing it. What command should you use?
How can you tell if a database object is invalid?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)