PL/SQL :: Basic Concepts

Home > Technical Aptitude > PL/SQL > Basic Concepts > General Questions

NA
SHSTTON
65
Solv. Corr.
39
Solv. In. Corr.
104
Attempted
1 M:23 S
Avg. Time

1 / 41

Choose the correct option.

You can add a row using SQL in a database with which of the following?


AADD

BCREATE

CINSERT

DMAKE

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
84
Solv. Corr.
42
Solv. In. Corr.
126
Attempted
0 M:0 S
Avg. Time

2 / 41

Choose the correct option.

The command to remove rows from a table 'CUSTOMER' is:


AREMOVE FROM CUSTOMER ...

BDROP FROM CUSTOMER ...

CDELETE FROM CUSTOMER WHERE ...

DUPDATE FROM CUSTOMER ...

Answer: Option C

Explanation:

DELETE FROM CUSTOMER WHERE ...

Workspace

NA
SHSTTON
24
Solv. Corr.
101
Solv. In. Corr.
125
Attempted
0 M:0 S
Avg. Time

3 / 41

Choose the correct option.

The SQL WHERE clause:


Alimits the column data that are returned.

Blimits the row data are returned.

CBoth A and B are correct.

DNeither A nor B are correct.

Answer: Option B

Explanation:

limits the row data are returned.

Workspace

NA
SHSTTON
79
Solv. Corr.
44
Solv. In. Corr.
123
Attempted
0 M:0 S
Avg. Time

4 / 41

Choose the correct option.

The command to eliminate a table from a database is:


AREMOVE TABLE CUSTOMER;

BDROP TABLE CUSTOMER;

CDELETE TABLE CUSTOMER;

DUPDATE TABLE CUSTOMER;

Answer: Option B

Explanation:

If you actually want to remove the table definitions as well as the data, simply drop the tables.
TRUNCATE TABLE empties it, but leaves its structure for future dat Like TRUNCATE TABLE CUSTOMER.
Removes all rows from a table without logging the individual row deletions

Workspace

NA
SHSTTON
40
Solv. Corr.
80
Solv. In. Corr.
120
Attempted
0 M:0 S
Avg. Time

5 / 41

Choose the correct option.

ON UPDATE CASCADE ensures which of the following?


ANormalization

BData Integrity

CMaterialized Views

DAll of the above.

Answer: Option B

Explanation:

ON UPDATE CASCADE is used for checking data in the table after ALTER operation.
Example: Alter table emp add constraint Unique Key (DID) ON UPDATE CASCADE. This will restrict the update operation if any dublicate values exists.

Workspace

NA
SHSTTON
77
Solv. Corr.
28
Solv. In. Corr.
105
Attempted
0 M:0 S
Avg. Time

6 / 41

Choose the correct option.

SQL data definition commands make up a(n) ________ .


ADDL

BDML

CHTML

DXML

Answer: Option A

Explanation:

Oracle SQL Do support XML to be inserted into the DB table. The Datatype for XML is XMLType.
We use extract() and existsNode() like functions to access the XML data into DB.

Workspace

NA
SHSTTON
68
Solv. Corr.
37
Solv. In. Corr.
105
Attempted
0 M:0 S
Avg. Time

7 / 41

Choose the correct option.

Which of the following is valid SQL for an Index?


ACREATE INDEX ID;

BCHANGE INDEX ID;

CADD INDEX ID;

DREMOVE INDEX ID;

Answer: Option A

Explanation:

Index is created to make the searches (select query) faster. But to use the index we need to write the SQL select statement using the column on which we created the Index.
Example: Create index indx1 on emp (empno). To use the benefits, we have to write select * from emp where empno > 0;

Workspace

NA
SHSTTON
45
Solv. Corr.
50
Solv. In. Corr.
95
Attempted
0 M:6 S
Avg. Time

8 / 41

Choose the correct option.

In which three cases would you use the USING clause? (Choose three.)


AThe tables to be joined have columns of the same name and different data types.

BThe tables to be joined have multiple NULL columns.

CThe tables to be joined have columns with the same name and compatible data types.

DYou want to use a NATURAL join, but you want to restrict the number of columns in the join condition.

EA, C & D

Answer: Option E

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
73
Solv. Corr.
26
Solv. In. Corr.
99
Attempted
0 M:0 S
Avg. Time

9 / 41

Choose the correct option.

Which of the following is the original purpose of SQL?


ATo specify the syntax and semantics of SQL data definition language

BTo specify the syntax and semantics of SQL manipulation language

CTo define the data structures

DAll of the above.

Answer: Option D

Explanation:

All of the above.

Workspace

NA
SHSTTON
25
Solv. Corr.
69
Solv. In. Corr.
94
Attempted
0 M:0 S
Avg. Time

10 / 41

Choose the correct option.

The wildcard in a WHERE clause is useful when?


AAn exact match is necessary in a SELECT statement.

BAn exact match is not possible in a SELECT statement.

CAn exact match is necessary in a CREATE statement.

DAn exact match is not possible in a CREATE statement.

Answer: Option B

Explanation:

Wildcards are basically for pattern matching.
Select * from emp where ename like = 'A%'; - Lists all emps with starting
Likewise % (For ignoring any number of characters) and _(Only one character).

Workspace