Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Question

This is a discussion on Question within the Oracle forums, part of the Databases category; Write PLSQL to print the Mulpilication Table in maths....

Go Back   Geeks Talk > Databases > Oracle
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Oracle Oracle 9i & Oracle 10g Knowledge Base Learn and Share Oracle Technology related articles, white papers, tutorials / study materials, example codes, FAQ's, Tips and Tricks.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-17-2008
Banned
 
Join Date: Oct 2008
Location: makkah
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Gaza Girl is on a distinguished road
Question

Write PLSQL to print the Mulpilication Table in maths.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-17-2008
Expert Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 529
Thanks: 30
Thanked 63 Times in 61 Posts
susarlasireesha will become famous soon enough
Re: Question

sql query

select rownum||' * '|| &tnm ||' = ' ||rownum*&tnm from tab where rownum<=20

or

pl/sql block

declare
i number;
tbl number:=2;
begin
for i in 1..20
loop
dbms_output.put_line(i||' * '||tbl||' = '|| i*tbl);
end loop;
end;
__________________
Sireesha
Reply With Quote
  #3 (permalink)  
Old 11-17-2008
Junior Member
 
Join Date: Nov 2008
Location: chennai
Posts: 15
Thanks: 1
Thanked 1 Time in 1 Post
jafar_cse is on a distinguished road
Re: Question

Hi check with below codes.
declare
i number;
j number;
n number;
begin
n:=&n;---upto which number u want
for i in 1..n
loop
DBMS_OUTPUT.put_line('Multiplication table for---->'|| i);
for j in 1..10
loop
DBMS_OUTPUT.put_line((i||' X '|| j ||' = '||i*j);
--insert into tom values(i||' X '|| j ||' = '||i*j);
end loop;
end loop;
end;
Reply With Quote
  #4 (permalink)  
Old 11-17-2008
Expert Member
 
Join Date: Apr 2007
Location: Bangalore
Posts: 529
Thanks: 30
Thanked 63 Times in 61 Posts
susarlasireesha will become famous soon enough
Re: Question

declare
--i number;
--j number;
n number;
begin
n:=&n;---upto which number u want
for i in 1..n
loop
DBMS_OUTPUT.put_line('Multiplication table for---->'||(i));
for j in 1..10
loop
DBMS_OUTPUT.put_line((i)||' X '|| (j) ||' = '||(i*j));
--insert into tom values(i||' X '|| j ||' = '||i*j);
end loop;
end loop;
end;
__________________
Sireesha
Reply With Quote
  #5 (permalink)  
Old 11-17-2008
Expert Member
 
Join Date: Nov 2008
Location: Chennai
Posts: 303
Thanks: 1
Thanked 37 Times in 32 Posts
amitpatel66 is on a distinguished road
Re: Question

Declare
i number := &n;
begin
for j in 1..i loop
for k in 1..12 loop
dbms_output.put_line(j||'*'||k||'='||j*k);
end loop;
dbms_output.put_line(' ');
end loop;
end;
Reply With Quote
Reply

  Geeks Talk > Databases > Oracle

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
sql question sanjay kumar rajwar SQL Server 7 04-02-2009 10:25 AM
Question!!! bee896 C and C++ 1 10-25-2008 01:41 PM
C++ Question bee896 C and C++ 3 10-23-2008 12:59 AM
Question about QTP SangeethaG QTP 4 09-12-2008 01:27 AM
question sumerram Interviews 6 09-01-2008 10:01 PM


All times are GMT -4. The time now is 04:48 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved