DML/DDL COMMANDS
Done in SQL
CREATION OF TABLES:
INSERTION OF VALUES INTO TABLES:
SELECT COMMAND:
AGGREGATES
NUMERIC FUNCTIONS
CHARACTER FUNCTIONS:
DATE FUNCTIONS:
VIEWS
JOIN COMMAND
QUERIES
1.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED BOAT 103?
2.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED THE GREEN BOAT?
3.FIND THE SIDs OF SAILORS WHO HAVE RESERVED A RED BOAT?
4.FIND THE COLOURS OF BOATS RESERVED BY LUBBER?
5.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED ON MONDAY?
6.FIND THE NAMES OF THE SAILORS WHOSE AGE IS GREATER THAN 16?
7.FIND THE COLOUR OF THE BOATS RESERVED BY THE SAILORS WHOSE AGE IS GREATER THAN 25?
NESTED QUERIES
1.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED BOAT 103?
2.FIND THE SAILORS WHO HAVE NOT RESERVED BOAT 103?
3.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED A RED BOAT?
GROUP BY CLAUSE
1.FIND THE AGE OF THE YOUNGEST SAILOR FOR EACH RATING LEVEL?
2.FIND THE AVERAGE AGE OF SAILORS FOR EACH RATING LEVEL THAT HAS ATLEAST TWO SAILORS?
CORELATED NESTED QUERIES
1.FIND THE NAMES OF THE SAILORS WHO HAVE RESERVED BOAT 103?
2.FIND THE NAMES OF THE SAILOR WITH BID=103?
3.FIND THE NAMES OF SAILORS WHO HAVE NOT ACQUIRED BID =103
PL/SQL PROGRAMS
1.FIND THE SUM OF TWO INTERGERS?
2.FIND THE AVERAGE OF 3 INTEGERS?
3.FIND THE RESULT OF THE STUDENT?
4.FIND WHETHER THE GIVEN NUMBER IS EVEN OR ODD?
5.PRINTIN THE FIRST 20 INTEGERS?
6.PRINTING SUM OF GIVEN NUMBERS?
7.FINDING FACTORIAL OF GIVEN NUMBER?
EXCEPTIONS
ZERO_DIVIDE Exception
Catch 'divide by zero' exception
OTHERS Exception
CASES
OTHERS
TRIGGERS
What is a Trigger?
Syntax of Triggers
1) Create the 'product' table and 'product_price_history' table
2) Create the price_history_trigger and execute it.
3) Lets update the price of a product.
4)If you ROLLBACK the transaction before committing to the database, the data inserted to the table is also rolled back.
Download Following Link For Above Programs:
http://www.ziddu.com/download/8088346/SQL.doc.html
Subscribe to:
Post Comments (Atom)
Check out more about sql commands here
ReplyDelete