Results 1 to 5 of 5

Thread: Subqueries in oracle database

  1. #1
    Join Date
    Jan 2010
    Posts
    56

    Subqueries in oracle database

    Hello guys !

    Actually,I have some little problem regarding the execution and implementation of subqueries in the oracle database.How is it implemented with the SQL and PL/SQL statement .So please give me some suggestion regarding this issue and it would be appreciated and thanks to view my question.

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    Subqueries in oracle database

    The Subqueries :
    The subquery is the query within a query.Using SQL statement,you can create and implement your own subquery and can use within the procedures of the database.These queries are covered with the different clause like: SELECT,FROM and WHERE and within that there are so many pseudo columns which can be added to increase the condition based information from database.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Using Subqueries in oracle database

    Using Subqueries in oracle database :

    Probably,the subqueries found between the WHERE clause which is also called the Nested subquery.The example is given below :

    Code:
    select * from all_tables tabs
    where tabs.table_name in 	(select col_name.table_name
    	 from all_tab_columns cols
    	 where cols.column_name = 'specified_conditioning_Column_name ');

  4. #4
    Join Date
    Feb 2008
    Posts
    1,852

    Subqueries in oracle database

    Sub-Queries with multiple columns :

    I am going to show you an example which will give you some result for more than two columns :

    Code:
    SELECT * FROM emp
    WHERE (salary,manager) = (1000,41);
    This result will return the invalidity error because two columns can't return the required result for two columns but using subquery,we can do it very easily :

    Code:
    SELECT * FROM emp
    WHERE (salary,manager) = (SELECT 1000,41 FROM dual);

  5. #5
    Join Date
    Jan 2008
    Posts
    1,521

    Inserting values using subqueries

    Inserting values using subqueries :

    You can insert the value in database object and it takes the following form to implement :

    Code:
    SQL> INSERT INTO ( SELECT Emp_id,Emp_name,City FROM Emp_data
                  WHERE Mgr_no<30 with check option)
                        VALUES (03, 'Richie', 'Tokyo');

Similar Threads

  1. Recycle bin in oracle database
    By Norse in forum Software Development
    Replies: 4
    Last Post: 09-02-2010, 10:32 PM
  2. Java in oracle 9i database
    By Gerri in forum Software Development
    Replies: 4
    Last Post: 03-02-2010, 08:35 PM
  3. Managing oracle 9i Database
    By Landan in forum Software Development
    Replies: 3
    Last Post: 21-01-2010, 11:05 AM
  4. Connect to Oracle database using VB 6.0
    By Ariadne in forum Software Development
    Replies: 2
    Last Post: 19-01-2009, 06:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,425,477.77691 seconds with 17 queries