NEW
Font size
WorksheetsSQL_RDBMS
Total questions: 12
Worksheet time: 4mins
RDMBs has been designed to handle what kind of data?
semi-structured data
Structured Data
Unstructured Data
All of them
It is not possible to join 2 Tables if they don't have any common fields (Columns)
True
False
What will be the output? select count(*) from sample_table
4
5
2
3
Which join will you use if we need all records from both the tables with no duplicates?
LEFT OUTER JOIN
FULL OUTER JOIN
INNER JOIN
CROSS JOIN
"create" command falls under which category?
DDL
DML
DCL
TCL
What is the difference b/w DROP and DELETE commands?
Drop -> Can't recover the deleted data. Delete -> Can recover deleted data
Both Drop and Delete drops the schema as well as entire data
Both Drop and Delete just deletes records based on condition
Drop -> deletes entire data & schema. Delete -> deletes records based on condition
Which of the following is NOT correct wrt RDBMS?
Consistency may not be maintained at times
There is a solid structure attached to each table
Data is in the form of Rows and Columns
While storing Sequence of records is insignificant
How many records will this query output? select * from emp where 1=2
2 Records
All Records
1 Record
0 Records
What will be the output? select count(id) from sample_table
5
3
2
0
Which query will get the second highest salary from emp table?
select second(salary) from emp where salary
select TOP 2 Salary from emp order by salary
select max(salary) from emp where salary<>(select max(salary) from emp)
select max(e.salary) from emp e where e.salary = second_highest()
Which of the following is NOT a window function?
SUBSTRING
ROW_NUMBER()
RANK()
COUNT()
Which is the correct query to fetch the fields "dept_id", "dept_name", "Salary" dept wise highest salary information? I want all dept_id records at any cost.
select d.dept_id, d.dept_name, max(e.salary) from emp e RIGHT JOIN dept d on e.dept_id=d.id
select d.dept_id, d.dept_name, max(e.salary) from emp e, dept d
select d.dept_id, d.dept_name, max(e.salary) from emp e RIGHT JOIN dept d on e.dept_id=d.id
group by d.dept_id, d.dept_name
select d.dept_id, d.dept_name, max(e.salary) from emp e FULL OUTER JOIN dept d on e.dept_id=d.id
