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
Is stored procedure faster than query?
What is meant by truncate in sql?
How long does it take to learn pl sql?
What are the different datatypes available in PL/SQL?
What is a dynamic query?
how many sql dml commands are supported by 'mysql'? : Sql dba
What is the difference between nested table and varray?
Which certification is best for sql?
how to get help information from the server? : Sql dba
How do you remove duplicates without using distinct in sql?
What is posting?
What is graph sql?
State few characteristics of pl/sql?
how do you know the version of your mysql server? : Sql dba
What is the difference between the conventional and direct path loads? : aql loader