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
Is drop table faster than truncate?
what is the difference between group by and order by in sql? : Sql dba
what is a primary key? : Sql dba
what are the advantages and disadvantages of cascading style sheets? : Sql dba
what does myisamchk do? : Sql dba
which operator is used in query for pattern matching? : Sql dba
what are date and time intervals? : Sql dba
What is the difference between database trigger and stored procedure?
Explain what is a column in a table?
What is crud stand for?
How do I pipe the output of one isql to another?
What is output spooling in sql*plus?
Write a sql select query that only returns each name only once from a table?
Is left join faster than join?
Explain the rollback statement?