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 |
Explain system functions or built-in functions? What are different types of system functions?
How you can find out if an index is useful to the optimizer?
Explain datetime2 data type in sal server 2008?
How are the exceptions handled in sql server programming?
What is difference between table aliases and column aliases? Do they affect performance?
why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration
What samples and sample databases are provided by microsoft?
What is the default port for SQL Server over a firewall?
How to handle errors in Stored Procedures.
How can you check the version of sql server?
How do you optimize Sql queries ?
How would you retrieve Unique rows from table without using UNIQUE and DISTINCT keyword?
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)