Find jobs | Company-wise jobs
Jobseekers | Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Interview Q&A Tutorials Oracle Sql server .NET Java Soft skills CV GD Work from home Online practice test FAQs in PDF Books Jobs FAQs
Interview questions                                 
Oracle interview
Oracle architecture
Oracle FAQs
Test your Oracle skills!
More Oracle FAQs
Oracle processes
Oracle memory area
Oracle file types
Oracle database objects
Oracle operators
Oracle composite
Oracle constraints
Oracle data types
Oracle DCL and TCL
Oracle DML commands
Oracle error handling
Oracle functions
Oracle function, procedure, package
Oracle import and export
Oracle sub queries
Oracle table
Oracle triggers
Oracle views
Oracle synonym
Oracle indexes
Oracle joins
Oracle cursors
Oracle form
Oracle security
Oracle system privilege
Oracle object privileges
Oracle table privileges
Oracle view privileges
Oracle backup & recovery
Oracle DBA
Oracle PL/SQL
Oracle nested table & varrays
Oracle large objects
Oracle replication
Oracle transaction
Oracle optimizer
Oracle auditing
Oracle backup
Oracle database tuning
Oracle application tuning
Oracle procedures
Oracle functions
Oracle loops
Oracle exceptions
Oracle Select into clause
Oracle string functions
Oracle numeric functions
Oracle date functions
Oracle translate and decode
Oracle correlated sub-queries
Oracle union, intersect and minus
Oracle clusters
Oracle sequences
Oracle tablespaces
Oracle object datatypes
Oracle Tutorial
 

Oracle loops

<<Previous  Next>>
Oracle - Loops - Feb 23, 2010 at 11:00 PM by Rajmeet Ghai

Explain uses of endless looping in PL/SQL with an example.

End less looping has no bounds and the program continues to operate endlessly until EXIT WHEN condition evaluates to TRUE. The example below will go on printing number because the EXIT WHEN condition never evaluates to true. This can be used to check the error handling of the program.

declare
          numb number := 1;
              begin
                   loop
                       dbms_output.put_line ('Number is '|| numb);
                     numb:= numb + 1;
                        exit when numb < 1; -- Never TRUE
                   end loop;
              end;

Oracle - Loops - Feb 23, 2010 at 11:00 PM by Rajmeet Ghai

Provide an example of While loop using PL/SQL.

While Loop in PL/SQL is used to execute some code until the condition becomes true:

DECLARE
    a NUMBER := 0;
           BEGIN
                  WHILE a <= 10 LOOP
                              a := a + 1;
    DBMS_OUTPUT.PUT_LINE('The value of a is ' || a);
                  END LOOP;
            END;

Oracle - Loops - Feb 23, 2010 at 11:00 PM by Rajmeet Ghai

Define Repeat-until loop in PL/SQL.

REPEAT UNTIL or DO WHILE loop executes the code at least once before checking for the condition.

Oracle - Loops - Feb 23, 2010 at 11:00 PM by Rajmeet Ghai

Provide an example of For loop using PL/SQL.

FOR loop in PL/SQL executes the code for a specific number of times.

Example:
Here, the for loop will print the number from 1(lower bound) to .. 10(upper bound)
BEGIN
             FOR num IN 1..10
    LOOP
             dbms_output.put_line(num);
    END LOOP;
END;

Also read
Oracle views

What is the content view and stacked view?, Explain the different types of canvas views, Explain the significance of OR REPLACE, FORCE and NOFORCE while creating view.............

Oracle table

Explain drop and truncate table command, Write the command to view the structure of the table, What are the limitation of alter command?, Explain Alter Table Command. What are the limitations of Alter Table command?............

Oracle Synonym

Table references can be complicated. So oracle allows you create synonym for a complicated reference. It renames a table reference..........

Oracle sequences

A field in oracle can be kept as auto incremented by using sequence. it can be used to create a number sequence...........


<<Previous  Next>>

 

 
Want to be hunted by potential employers? Just submit your key skills!

Popular FAQs

.NET .Net Architecture ADO.NET Java Oracle C#.NET
VB.NET DOT.NET AJAX ASP.NET NET Framework OOPS in .NET
C++ Sql Server Data warehousing EJB MySQL Linux
PHP UML Networking Testing XML  
 
Copyright © 2008 - 2010 CareerRide.com. All rights reserved.