How to display all Friday's in a year with date?
Answer Posted / dinesh
DECLARE
c date:='01-JAN-15';
d date:='31-DEC-15';
a number(10);
BEGIN
a:=d-c;
FOR i in 1..a
LOOP
IF to_char(c,'DY')='FRI' THEN
DBMS_OUTPUT.PUT_LINE('THIS IS FRIDAY DATE:='|| ' '|| c);
END IF;
c:=c+1;
END loop;
END;
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what are ddl statements in mysql? : Sql dba
Does oracle roll back the transaction on an error?
How do I kill a query in postgresql?
What is difference between table and view?
what is the difference between group by and order by in sql? : Sql dba
how can you see all indexes defined for a table? : Sql dba
What are the most important ddl statements in sql?
Explain the uses of a database trigger?
How can we solve sql error: ora-00904: invalid identifier?
How much does sql certification cost?
What is t sql in sql server?
Explain the purpose of %type and %rowtype data types?
What is the importance of sqlcode and sqlerrm?
How does sql profiler work?
What are the built in functions of sql?