Sunteți pe pagina 1din 4

My-SqL

PART - 1 1. What is SQL ? What are the features of SQL . 2. Components (SQL)
DDL DML DCL DQL TCL create , drop , alter , rename insert , update , delete , truncate grant , revoke select commit , rollback , savepoint

3. Executing any or group of queries from a text file . 4. Creating table 5. Inserting data into table 6. Viewing data from a table using select 7. Eliminating duplicate rows using Distinct 8. Selecting data from table in a sorted order using Order By 9. Creating table from a table 10. Inserting data into a table from another table 11. Deleting rows and tables 12. Updating contents of a table
Updating all rows Updating rows conditionally

13. Modifying structure of a using Alter command


Adding new columns Dropping columns Modifying existing columns

14. Renaming Tables 15. Truncating Tables ( How is it different from drop and delete ) 16. Displaying Table structure using Describe 17. Finding out tables created by a user .

PART - 2 1. Adding primary key ( either single or multiple attribute) constraint during table creation 2. Adding foreign key ( either single or multiple attribute ) constraint during table creation Using on delete cascade with FK Using on delete set NULL with FK 3. Adding Unique constraint 4. Using Not NULL constraint 5. Adding default values using default clause 6. Adding constraints using Alter command 7. Dropping constraints using Alter command 8. Using the Update command Difference between NULL and empty string . Select * from STUDENT where name=; Select * from STUDENT where name is NULL ; Is the above two queries same or different . Justify . PART 3 1. Aliasing columns in a query 2. Aliasing tables in a join query 3. Using logical operators ( AND , OR , NOT ) 4. Using arithmetic operators ( + - * / ) 5. Using comparison operators ( = <> < <= > => ) 6. Range searching using Between And . clause and NOT Between clause 7. Pattern searching using LIKE ( with % and _ ) 8. Searching using IN and NOT IN clauses 9. Aggregate functions like Avg , Min , Max , count(),count(*),sum ,round 10. Date conversion functions 11. Using Distinct clause 12. Queries using is NULL and is NOT NULL Difference between = operator and IN clause Difference between count() and count(*)

PART 4 1. 2. 3. 4. Queries using Group By clause Queries using having clause What is a sub query Types : Nested ( inner query executed first ) Parallel ( More than 1 sub query ) Correlated ( Outer query executed first ) Using Exists and Not Exists operator Using UNION , INTESECT and MINUS in queries Joins in queries ( inner , outer { full , left , right } , cross or Cartesian product ) Self Join ( Joining a table to itself ) Difference between join and sub query How group by and order by are different How where clause and having clause is different PART 5 1. What are Indexes . Advantages of indexes 2. Types Simple Composite 3. Creating and dropping Indexes 4. What is a view . Advantages of views 5. Types Simple Complex Read only view Updateable view 6. Creating and dropping views 7. What is a trigger ( Cascading and mutating ) . Advantages of triggers 8. Components of a trigger 9. Types Row level Statement Level (Table) Before and After Triggers 10. Creating and dropping triggers

5. 6. 7. 8.

PART 6 1. Granting privileges to a new User 2. Revoking privileges from a User 3. Transaction Processing like ( Rollback , Commit , Savepoint )

S-ar putea să vă placă și