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 is a system versioned table?
Explain what is table in a database?
What is relationship? How many types of relationship are there?
Does truncate table reset auto increment?
What are the types of subqueries?
Is foreign key mandatory?
what is the use of set statement in tsql? : Transact sql
What is cte sql?
how can we destroy the session, how can we unset the variable of a session? : Sql dba
explain the difference between delete , truncate and drop commands? : Sql dba
How do you copy a table in sql?
What is a sql*loader control file?
How to install oracle sql developer?
Does mysql_real_escape_string prevent sql injection?
Explain polymorphism in pl/sql.