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


Please Help Members By Posting Answers For Below Questions

How do you write a subquery?

692


What is pl sql in dbms?

693


What is character functions?

744


how can I make a script that can be bi-language (supports english, german)? : Sql dba

728


What is sql mysql pl sql oracle?

784






What are the different ddl commands in sql?

739


What is the difference between a primary key and a clustered index?

697


What is sql dialect?

740


What is sql rowcount?

726


What is a left join?

693


What are the types of triggers in sql?

698


What is database migration?

696


What does the argument [or replace] do?

807


Is progress software supports to ( pl/sql )?

717


Why do we need databases?

730