HOW TO PRINT
*
**
***
****
*****
BY USING SQL QUERY? (MAY BE USING SCRIPT)
Answer Posted / s m nadeem
Declare
type stars is table of varchar2(10);
v_star stars;
v_str varchar2(10);
Begin
select lpad('*', rownum, '*')
bulk collect
into v_star
from tab_star
where rownum < 6;
for i in 1 .. v_star.count loop
v_str := v_star(i);
dbms_output.put_line(v_str);
End loop;
End;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the types of join and explain each?
What is difference between left and right outer join?
What is primary key secondary key alternate key candidate key?
Which sql statement is used to return only different values?
how to add a new column to an existing table in mysql? : Sql dba
how do you login to mysql using unix shell? : Sql dba
Why do we use cursors?
What is application trigger?
How do I create a sql script?
How would you reference column values before and after you have inserted and deleted triggers?
How can you fetch common records from two tables?
what is commit? : Sql dba
State few characteristics of pl/sql?
What is an oracle stored procedure?
Explain correlated query work?