Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


HOW TO PRINT
*
**
***
****
*****
BY USING SQL QUERY? (MAY BE USING SCRIPT)

Answers were Sorted based on User's Feedback



HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

Answer / kart

select lpad('*',rownum,'*') Star from person where rownum<6
*
**
***
****
*****

Is This Answer Correct ?    21 Yes 4 No

HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

Answer / shivaindu

select lpad('*',rownum,'*') Star from dual connect by level < 6;

Is This Answer Correct ?    6 Yes 0 No

HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

Answer / swastik

SELECT
LPAD('*',ROWNUM,'*') Stars
FROM ALL_OBJECTS
WHERE ROWNUM <= 5

Is This Answer Correct ?    3 Yes 0 No

HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

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

HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

Answer / sdsd

no need for the script

Is This Answer Correct ?    0 Yes 0 No

HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

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

HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

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

HOW TO PRINT * ** *** **** ***** BY USING SQL QUERY? (MAY BE USING SCRIPT)..

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

Post New Answer

More SQL PLSQL Interview Questions

difference between cursor and procedure in a package

3 Answers   PCS,


write a query to delete similar records in same table

13 Answers   TCS,


Write a sql query to find the names of employees that begin with ‘a’?

0 Answers  


What is rowtype?

0 Answers  


How do I run a query in pl sql developer?

0 Answers  


What has stored procedures in sql?

0 Answers  


source destination distance chennai bangalore 500 bangalore chennai 500 hyd delhi 1000 delhi hyd 1000 bangalore hyd 800 Here chennai to bangalore and bangalore to chennai is same distance. and hyd and delhi also same criteria. Based on the distance i want to display only one row using sql query?

4 Answers   JPMorgan Chase,


what is the difference between a local and a global temporary table? : Sql dba

0 Answers  


Why is pl sql used?

0 Answers  


What is compound trigger?

0 Answers  


What is a delimiter in sas?

0 Answers  


what is the difference between a web-garden and a web-farm? : Sql dba

0 Answers  


Categories