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 many clustered indexes can you have?

535


What is compound trigger?

558


How do you write an inner join query?

515


How do I get sql certification?

528


How do I find duplicates in sql?

508






What is clustered index in sql?

588


What are the different set operators available in sql?

565


What are types of exception?

538


What are the different types of constraints?

566


what are all the different types of indexes? : Sql dba

530


What is Collation Sensitivity ? What are the various type ?

501


What is rtm in testing?

576


what are different types of collation sensitivity? : Sql dba

554


What is the use of desc in sql?

496


How do you determine the current isolation level? : Transact sql

580