GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Oracle
Go To First  |  Previous Question  |  Next Question 
 Oracle  |  Question 140 of 244    Print  
How do you decide on whether to use a Procedure or a Function for a particular task ?
Is it possible to get the last 10 rows of a table? If Yes How?

  
Total Answers and Comments: 2 Last Update: July 18, 2007     Asked by: sathish_p 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 18, 2007 00:52:39   #1  
jamesravid Member Since: June 2006   Contribution: 429    

RE: How do you decide on whether to use a Procedure or...
I would consider the following points

1. Identify how many variable should be returned by your pl/sql code. If it is only one go for functions else go for procedures.

2. Fuctions can be used in ur sql queries whereas procedures can't be used.

 
Is this answer useful? Yes | No
July 18, 2007 00:55:25   #2  
jamesravid Member Since: June 2006   Contribution: 429    

RE: How do you decide on whether to use a Procedure or...
For ur second question
select * from
(select * from (select col1 col2 rownum as rank
from table) a
order by a.rank desc)
where rownum < 10

 
Is this answer useful? Yes | No

 Related Questions

I have got the following error when importing few of my package bodies and triggers. ORA-01653: unable to extend table SYS.IDL_UB1$ by 13 in tablespace SYSTEM The tablespace SYSTEM had enough space at the time of import. Later when I tried to create theses objects seperately through a script, they were successfully created. It is important to note that not all package bodies and triggers failed. If you have any idea regarding this error, please let me know the problem and solution, if possible.

I am creating one table in oracle. in database it is allocated some memory for that table. how can i know how much memory that table is holding in that database?

Latest Answer : Dual is a system defined table having one rows and one column. A person who has informed that it has virtual existence is not proper. It has physical existence.Ex:SQL> select * from dual;D-XMeans a table having single row and columns.Regards,Deepak ...
Read Answers (12) | Asked by : Sundra

How to delete duplicate values from tableFor Ex: A table contains 200 rows in that 100 rows are duplicate values, how to delete those 100 rows?

Hi,I have scenario where I need to upload data from XML file into a table. XML file is a predifined format. How can I achieve this, Is there any built in package similar to SQL loader to extract required field values and upload them into table.Pls suggestThanks
Read Answers (2) | Asked by : vishnu

View Question | Asked by : Vikram

Write down a query for inserting 'n' rows into a table, prompting for the values each time a record is inserted

How do I find out the time taken by oracle to execute the sql statement or a procedure? Is it possible by firing a select?

1. can we use DML operations on Dual Table?2. What is difference between View and materialisedView?3. New features in Oracle9i SQL?
Read Answers (3) | Asked by : vijaya

When i create any table in my schema an error occurs : ORA-01658: unable to create INITIAL extent for segment in tablespace OWAPUBHow to overcome of it?
Read Answers (2) | Asked by : Kirti Kumar Gupta


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

ODP.NET - Retrieving Multiple Rows on to the Grid

ODP NET Retrieving Multiple Rows on to the Grid In the previous section we tried to retrieve only one row using OracleDataReader In this section we will try to retrieve more than one row or a result set and populate a DataGridView on a WinForm mosgoogle The following code lists out the details of al
 

Getting Started with Oracle and ODP.NET

ODP NET Developer&rsquo; s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php&quot; document ready function var highlighted
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape