St. Britto Hr. Sec. School - Madurai
12th Computer Science Monthly Test - 2 ( Structured Query Language (SQL) )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
WhatisSQL?
-
Write the syntax of creating table with constraint.
-
Write the function performed by DDL.
-
Which constraint helps to set a limit value placed for a field?
-
Write a SQL statement to modify the student table structure by adding a new field.
-
-
How will set a primary key for more than one field? Explain with example.
-
How will you generate queries and retrieve data from the table? Explain?
-
-
Write the syntax for the following commands.
(i) INSERT (ii) DELETE (iii) UPDATE -
Write a SQL statement using DISTINCT keyword.
-
List the data types used in SQL.
-
Explain ALTER command in detail.
-
Consider the following employee table. Write SQL commands for the qtns.(i) to (v).
EMP CODE NAME DESIG PAY ALLOWANCE S1001 Hariharan Supervisor 29000 12000 P1002 Shaji Operator 10000 5500 P1003 Prasad Operator 12000 6500 C1004 Manjima Clerk 8000 4500 M1005 Ratheesh Mechanic 20000 7000 (i) To display the details of all employees in descending order of pay.
(ii) To display all employees whose allowance is between 5000 and 7000.
(iii) To remove the employees who are mechanic.
(iv) To add a new row.
(v) To display the details of all employees who are operators. -
What are the components of SQL? Write the commands in each.
-
-
Write a note on
(i) TRUNCATE command.
(ii) DROP TABLE command. -
Construct the following SQL statements in the student table-
(i) SELECT statement using GROUP BY clause.
(ii) SELECT statement using ORDER BY clause.
-
-
Write a SQL statement to create a table for employee having any five fields and create a table constraint for the employee table.