DB Queries constraints and Triggers Mcqs
Our collections of Multiple choice questions and answers focuses on study of DB Queries constraints and Triggers. These questions are chosen from a collection of most authoritative and best reference books on DBMS. Our aim is to prepare an individual for competitive exams like NTS, GAT, ECAT, University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate knowledge on DB Queries constraints and Triggers comprehensively.
17. Select * from employee where salary>10000 and dept_id=101;Which of the following fields are displayed as output?
Salary, dept_id
Employee
Salary
All the field of employee relation
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
18. Which of the following statements contains an error?
Select * from emp where empid = 10003,
Select empid from emp where empid = 10006,
Select empid from emp,
Select empid where empid = 1009 and lastname = ‘GELLER’,
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
19. Insert into employee _____ (1002,Joey,2000);In the given query which of the keyword has to be inserted ?
Table
Values
Relation
Field
20. Which keyword must be used here to rename the field name ?
From
Rename
As
Join
21. SELECT * FROM employee WHERE dept_name=”Comp Sci”;In the SQL given above there is an error . Identify the error .
Dept_name
Employee
From
22. Which one of the following has to be added into the blank to select the dept_name which has Computer Science as its ending string ?
%
_
||
$
23. ’_ _ _ ’ matches any string of ______ three characters. ’_ _ _ %’ matches any string of at ______ three characters.
Atleast, Exactly
Exactly, Atleast
Atleast, All
All , Exactly
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
24. By default, the order by clause lists items in ______ order.
Descending
Any
Same
Ascending
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
25. To display the salary from greater to smaller and name in ascending order which of the following options should be used ?
Ascending, Descending
Asc, Desc
Desc, Asc
Descending, Ascending
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
26. This query can be replaced by which of the following ?
SELECT name
FROM instructor
WHERE salary BETWEEN 90000 AND 100000,
SELECT name
FROM employee
WHERE salary <= 90000 AND salary>=100000,
SELECT name
FROM employee
WHERE salary BETWEEN 90000 AND 100000,
SELECT name
FROM instructor
WHERE salary BETWEEN 100000 AND 90000,
Answer & Solution
FROM instructor
WHERE salary BETWEEN 90000 AND 100000;
No Solution for this Answer..! Report or Discus this Question
27. This query does which of the following operation?
All attributes of instructor and teaches are selected
All attributes of instructor are selected on the given condition
All attributes of teaches are selected on given condition
Only the some attributes from instructed and teaches are selected
Answer & Solution
No Solution for this Answer..! Report or Discus this Question
28. In SQL the spaces at the end of the string are removed by _______ function .
Upper
String
Trim
Lower
29. _____ operator is used for appending two strings.
&
%
||
_
30. The union operation is represented by
U
*