Font size
WorksheetsSQL
Total questions: 20
Worksheet time: 14mins
Which command is used t o add new row in a table?
Which command is used to change the schema of the the table?
Which command is used to change the values of columns in SQL?
A table customer contains 5 rows and 7 columns. what will be its caardinality and degree?
What is Primary key?
Define foreign key?
Write two differences between DDL and DML commands of SQL.
Write the difference between CHAR and VARCHAR.
What do you mean by NULL?
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?
Write the difference between WHERE and HAVING clause.
Define RDBMS? Name any two RDBMS softwares?
How can you display records in alphabetically in descending order?
select * from emp where name is desending
select name from emp descending
select name in emp order by descending;
select name from emp order by name descending;
Site any two differences between single row functions and aggregate function.
single row functions are applied on group of rows whereas aggregate functions applied on single row.
aggragate functions applied on one group and single row function applied on one row only
aggragate functions returns multiple outputs or rows. single row functions applied on single row
Aggragate functions applied on groups. it returns single output only.
Write the command to show the name of day on which India got independence?
what will be the output of the following:
Select round(12345.456,-2)
1234.47
12345
12300
123450
What will be the output of following command of SQL?
select substring('jain bharati mrigavati vidyalaya', 6,12);
bharati
bharati mrig
bharati mriga
bharati mrigavati
update emp set salary = NULL;
will set all values in column salary as NULL
Will set a new column named NULL
will display all values which are NULL in column salary
will change the structure of the column
Select * from emp where name like 'z%';
will dispaly all names from table emp
will display all names end with z
will display all records from table emp
will display all records from table emp where name start with 'z'.
To increase the salary of all employee by 10% of their salary from emp table.
select from emp where sal= sal * 10%;
update emp set sal= sal + sal* 0.10;
update emp set sal = sal + sal*10 where ecode < 1005;
update emp set sal= sal + 10
