SQL MCQ
SQL MCQ
SQL MCQ
SORT BY
ALIGN BY
ORDER BY
GROUP BY
CORRECT
PRIMARY KEY
ALTERNATE KEY
FOREIGN KEY
UNIQUE
CORRECT
Write an SQL query to find names of employee starting with ‘A’? Table name: Employee and
column name: EmpName
select *
from Employee
where EmpName like 'a%';
CORRECT
There is an error in the query given below. How can we correct it?
FROM students
GROUP BY subject_code;
select subject_code,avg(marks)
from students
group by subject_code
having avg(marks)>75
CORRECT
inner join
left outer join/left join
right outer join/right join
full outer join/full join
cartesian product/cross join
self join
CORRECT
RAW
CHAR
NUMERIC
VARCHAR
CORRECT
CORRECT
CORRECT
NOT NULL
UNIQUE
PRIMARY KEY
FOREIGN KEY
CHECK
DEFAULT
WRONG
CORRECT
CORRECT
A database language used for defining the whole database structure and schema is called:
DCL
DML
DDL
ALL OF THE ABOVE
CORRECT
Which data manipulation command is used to combine the records from one or more
tables?
SELECT
JOIN
PROJECT
PRODUCT
WRONG
FROM mytable
JOIN another_table
ON mytable.column = another_table.column
WHERE constraint_expression
GROUP BY column
HAVING constraint_expression
FROM
JOIN [WHERE]
WHERE [JOIN]
GROUP BY
HAVING [SELECT]
ORDER BY [HAVING]
SELECT [LIMIT]
CORRECT
CORRECT
TRUE
FALSE
CORRECT
FROM students;
CORRECT
BETWEEN
ANY
IN
ALL
CORRECT
CORRECT
CORRECT
Which function is used to divides one numeric expression by another and get the
remainder?
POWER
MOD
ROUND
REMAINDER
CORRECT
CORRECT
The virtual table that is created by data from the result of an SQL 'Select' statement is called
[VIEW]
CORRECT
CORRECT
ALTER
UPDATE
CREATE
SELECT
WRONG
CORRECT
DECIMAL
NUMERIC
FLOAT
CHARACTER
CORRECT