Select

Syntax:           
SELECT columns
FROM tables
WHERE predicates;
Example:

          SELECT *
          FROM suppliers
          WHERE city = 'Newark';


You can also use the select statement to retrieve fields from multiple tables.
SELECT orders.order_id, suppliers.name
FROM suppliers, orders
WHERE suppliers.supplier_id = orders.supplier_id;
You can select some fields from a table acoording to more than one conditions.
       
                 If you are trying to select details of 5 students  having maximum mark from bottom of the table

                     

select * from (select * from my_table order by mark desc) where rownum < 6;

Comments

Popular posts from this blog

Introduction To Oracle10g

Insert

Except