wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL

Total questions: 20

Worksheet time: 14mins

Name
Class
Date
1.

Which command is used t o add new row in a table?

4 lines
2.

Which command is used to change the schema of the the table?

4 lines
3.

Which command is used to change the values of columns in SQL?

4 lines
4.

A table customer contains 5 rows and 7 columns. what will be its caardinality and degree?

4 lines
5.

What is Primary key?

4 lines
6.

Define foreign key?

4 lines
7.

Write two differences between DDL and DML commands of SQL.

4 lines
8.

Write the difference between CHAR and VARCHAR.

4 lines
9.

What do you mean by NULL?

4 lines
10.

A table item and store have one common column item-id. item table consists of 5 rows and 3 coluns while the store table consists of 7 towns and 5 columns. What will be the degree and cardinality of these tables in the cartisian product?

4 lines
11.

Write the difference between WHERE and HAVING clause.

4 lines
12.

Define RDBMS? Name any two RDBMS softwares?

4 lines
13.

How can you display records in alphabetically in descending order?

a)

select * from emp where name is desending

b)

select name from emp descending

c)

select name in emp order by descending;

d)

select name from emp order by name descending;

14.

Site any two differences between single row functions and aggregate function.

a)

single row functions are applied on group of rows whereas aggregate functions applied on single row.

b)

aggragate functions applied on one group and single row function applied on one row only

c)

aggragate functions returns multiple outputs or rows. single row functions applied on single row

d)

Aggragate functions applied on groups. it returns single output only.

15.

Write the command to show the name of day on which India got independence?

4 lines
16.

what will be the output of the following:

Select round(12345.456,-2)

a)

1234.47

b)

12345

c)

12300

d)

123450

17.

What will be the output of following command of SQL?

select substring('jain bharati mrigavati vidyalaya', 6,12);

a)

bharati

b)

bharati mrig

c)

bharati mriga

d)

bharati mrigavati

18.

update emp set salary = NULL;

a)

will set all values in column salary as NULL

b)

Will set a new column named NULL

c)

will display all values which are NULL in column salary

d)

will change the structure of the column

19.

Select * from emp where name like 'z%';

a)

will dispaly all names from table emp

b)

will display all names end with z

c)

will display all records from table emp

d)

will display all records from table emp where name start with 'z'.

20.

To increase the salary of all employee by 10% of their salary from emp table.

a)

select from emp where sal= sal * 10%;

b)

update emp set sal= sal + sal* 0.10;

c)

update emp set sal = sal + sal*10 where ecode < 1005;

d)

update emp set sal= sal + 10