Miscellaneous Test 1 - Online Test

Test Difficulty Level: Medium

Syllabus of Test

Covering all general topics of SQL.

Sample Question from this online test:

Question: The DEPT table has DEPTNO as the primary key and has the following data:

SQL> SELECT * FROM dept;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
Consider the INSERT statement. Which option is correct?
INSERT INTO (SELECT * FROM dept WHERE deptno = 10)
VALUES (50, 'MARKETING', 'FORT WORTH');

Option A: The INSERT statement is invalid; a valid table name is missing.

Option B: 50 is not a valid DEPTNO value, since the subquery limits the DEPTNO to 10.

Option C: The statement will work without error.

Option D: A subquery and a VALUES clause cannot appear together.

To answer, click the "Start This Test" button below.

Start this Test






Comments

Kevin Yang on 2010-12-23 04:22:45 wrote,

Next

Ratnesh Shingrupe on 2012-09-02 11:09:53 wrote,

Great test.... really wonderful..... :RATNESH