How to find last day of the month in sql query

Answers were Sorted based on User's Feedback



How to find last day of the month in sql query..

Answer / vishwa

below query will get the last day of the month
select last_day(sysdate) from dual

Is This Answer Correct ?    14 Yes 0 No

How to find last day of the month in sql query..

Answer / ajit

select TO_CHAR( last_day(sysdate), 'day')
from dual

Is This Answer Correct ?    12 Yes 2 No

How to find last day of the month in sql query..

Answer / sujit pingale

select to_char(sysdate, 'day') from dual;

This will print output: tuesday i.e

select last_day(sysdate) from dual;

This will print output: 31-Aug-14

Is This Answer Correct ?    2 Yes 0 No

How to find last day of the month in sql query..

Answer / manoranjan sethy

Select LAST_DAY(Sysdate) From Dual;

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Which one of the following join types will always create a Cartesian Product? 1. CROSS JOIN 2. LEFT OUTER JOIN 3. RIGHT OUTER JOIN 4. FULL OUTER JOIN 5. INNER JOIN

2 Answers  


what is the difference between truncate and delete statement? : Transact sql

0 Answers  


How would you pass hints to the sql processor?

0 Answers  


what is the difference between delete and truncate statement in sql? : Sql dba

0 Answers  


What is the difference between Union and Union all. Which is faster.

0 Answers  






In what condition is it good to disable a trigger?

0 Answers  


Why do we use cursors?

0 Answers  


What happens if a procedure that updates a column of table X is called in a database trigger of the same table ?

1 Answers  


how to get @@error and @@rowcount at the same time? : Sql dba

0 Answers  


What is the use of %rowtype?

0 Answers  


how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba

0 Answers  


Is sql considered coding?

0 Answers  


Categories