SQL ASSIGMENT - Copy
SQL ASSIGMENT - Copy
Sample Tables
Empl table
Dept table
Pet Table
Event Table
Student Table
Assignment-1
Basic SQL Commands
P.1 Show databases
DDL Commands
Assignment-2
Creating Table with different constraints:
Not null
Unique constraint
Primary key constraint
Default constraint
Check constraint
Table – employee
(a).Create table with unique constraints:
Assignment-3
Table constraint and Column constraint
(a) Table constraint
Assignment-4
Alter Table Command.
(a) Adding Columns:
DML Commands
Assignment-1
(a) Inserting Data in Tables:
Insert into command with Null
Assignment-2
The SELECT Command
(a) Selecting all columns
(b) Reordering Columns in query
2. To list names of pet who have names ending with ‘y’, the command would be:
3. To list members which are not in areas with pin codes starting with 13, the command is:
Assignment-3
Consider the following MOVIE database and answer the SQL queries based on it.
(a) Retrieve movies information without mentioning their column names.
(b) List business done by movies showing only MovieID ,MovieName and BuisnessCost.
(d) Find the net profit of each movie showing its ID ,Name and Net Profit.
(e) List all movies with ProductionCost greater than 80,000 and less than 1,25,000 showing ID,
Name and ProductionCost.
(f) List all movies which fall in the category of Comedy or Action.
(g) List the movies which have not been released yet.