HOW TO PRINT
*
**
***
****
*****
BY USING SQL QUERY? (MAY BE USING SCRIPT)
Answers were Sorted based on User's Feedback
Answer / kart
select lpad('*',rownum,'*') Star from person where rownum<6
*
**
***
****
*****
| Is This Answer Correct ? | 21 Yes | 4 No |
Answer / shivaindu
select lpad('*',rownum,'*') Star from dual connect by level < 6;
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / swastik
SELECT
LPAD('*',ROWNUM,'*') Stars
FROM ALL_OBJECTS
WHERE ROWNUM <= 5
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / bijaylaxmi
declare
m number:=5;
n varchar2(30);
begin
for i in 1..m
loop
for j in 1..i
loop
n:=n||'*';
end loop;
dbms_output.put_line(n);
n:=null;
end loop;
end;
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / shrikant tyagi in nucleus soft
HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY
BE USING SCRIPT)
this is using script;
declare
type a1 is table of varchar2(100);
a a1;
b varchar2(100);
begin
select lpad('*',rownum,'*') bulk collect into a from
lea_agreement_dtl where rownum < 5;
for i in 1..a.count
loop
b:=b||' '||a(i);
end loop;
dbms_output.put_line(b);
end;
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
Answer / shrikant tyagi
HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY
BE USING SCRIPT)
this is using script;
declare
type a1 is table of varchar2(100);
a a1;
b varchar2(100);
begin
select lpad('*',rownum,'*') bulk collect into a from
lea_agreement_dtl where rownum < 5;
for i in 1..a.count
loop
b:=b||' '||a(i);
end loop;
dbms_output.put_line(b);
end;
| Is This Answer Correct ? | 0 Yes | 2 No |
how to create temparary sequence
What is pl sql architecture?
What is a rank in sql?
Is it mandatory for the primary key to be given a value when a new record is inserted?
Define SQL and state the differences between SQL and other conventional programming Languages?
What is a data definition language?
Which software is used for pl sql programming?
If a procedure within a package is invalidated whether the entire package will be invalid and has to be recompiled again?
How do you declare a user-defined exception?
Define commit?
If an unique key constraint on DATE column is created, will it validate the rows that are inserted with SYSDATE?
What is a database trigger?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)