How to display all Friday's in a year with date?
Answer Posted / nihar meher
declare
a date;
b date;
c number(15);
begin
select trunc(sysdate,'yyyy') into a from dual;
select add_months(trunc(sysdate,'yyyy'),12)-1 into b from dual;
c:=b-a;
for i in 1..c
loop
if to_char(a,'dy')='fri'
then
dbms_output.put_line(a);
end if;
a:=a+1;
end loop;
end;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a pragma statement?
What is assignment operator in pl sql?
explain commit and rollback in mysql : sql dba
How to get list of all tables from a database?
What are the various restrictions imposed on view in terms of dml?
What is raw datatype in sql?
How does sql*loader handles newline characters in a record? : aql loader
what is a materialized view? : Sql dba
Explain about various levels of constraint.
What is pl sql record in oracle?
How to display the current date in sql?
Can we enter data in a table in design view?
what is the difference between join and union? : Sql dba
Why commit is not used in triggers?
What is a sql schema used for?