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 pls integer?
Cite the differences between execution of triggers and stored procedures?
Why cross join is used?
What are sql data types?
Why we use joins in sql?
what is single byte over head in oracle..?
What is compound trigger?
Can there be more than one function with a similar name in a pl/sql block?
what is a constraint? : Sql dba
What are types of exception?
How do you optimize a stored procedure in sql?
What are the different operators available in sql?
What is flag in sql?
Mention what pl/sql package consists of?
What is bitemporal narrowing?