2011-05-06 11:02:28 UTC
A company Has following Departments:
Marketing, Designing,Production, packing
What will be the result of following query?
select * from table where department < 'Marketing';
Options are:
1) Query will return "Designing , packing"
2) Query will return "Designing ,Production, packing"
3) Query will return "packing"
4) String cannot be compared using < operator
5)Query will return "Designing";
Question 2:
Examine the two statements given below:
SELECT last_name, salary,hire_date FROM EMPLOYEES ORDER BY salary DESC
SELECT last_name, salary,hire_date FROM EMPLOYEES ORDER BY 2 DESC
What is true about them?
1) Two statements produce identical results
2)Second statement returns an error
3) There is no need to specify DESC because the results are stored in descending order by default.
Question 3:
How many foreign keys one can have in table?
options: 1, 2, 3, 4, 5, 6, None of above
Question 4:
Where should be SubQueries be used?
Options are:
1) To define the set of rows to be inserted in table
2) To define the set of rows to be included in a view
3) To define one or more values to be assigned to existing rows.
4) To provide values for condition in where clause
5) To define a table to be operated on by containing query
6) All of the above are correct.
7)None of the above is correct.
Question 5:
Which of the following statement are incorrect regarding simple & complex view?
options are:
1) A compex view is a combination of more than one single view.
2) A table can either have simple or complex view not both
Question 6:
Are both the statements correct:
Where deptNo in(2,4,5)
where deptNo =2 or deptNo=4 or deptNo=5
options are
a) true
b)False