Here are some important and popular Oracle SQL AND SQL Plus Multiple Choice Questions / Objective Type Questions:
Keep watching out for solutions and answers soon.
Which one will generate an error?
a.. SELECT * FROM emp WHERE empid = 493945;
b. SELECT empid FROM emp WHERE empid= 493945;
c. SELECT empid FROM emp;
d. SELECT empid WHERE empid = 56949 AND lastname = ‘SMITH';
How to specify a column alias?
a. Place the alias at the beginning of the statement to describe the table.
b. Place the alias after each column, separated by white space, to describe the column.
c. Place the alias after each column, separated by a comma, to describe the column.
d. Place the alias at the end of the statement to describe the table.
The NVL function
a. Assists in the distribution of output across multiple columns.
b. Allows the user to specify alternate output for non-null column values.
c. Allows the user to specify alternate output for null column values.
d Nullifies the value of the column output
Output from a table called PLAYS with two columns, PLAY_NAME and AUTHOR,is shown below.Which of the following SQL statements produced it?
“Midsummer Night’s Dream”, SHAKESPEARE
“Waiting For Godot”, BECKETT
“The Glass Menagerie”, WILLIAMS
a SELECT play_name author FROM plays;
b SELECT play_name, author FROM plays;
c SELECT play_name’, ‘ author FROM plays;
d SELECT play_name’, ‘ author PLAY_TABLE FROM plays;
Issuing the DEFINE_EDITOR=”emacs” will produce which outcome?
a. The emacs editor will become the SQL*Plus default text editor.
b. The emacs editor will start running immediately.
c. The emacs editor will no longer be used by SQL*Plus as the default text editor.
d. The emacs editor will be deleted from the system.
SQL, SQL Plus Multiple Choice Questions. Answers are not currently available. We may add this facility in the future.
The user issues the following statement. What will be displayed if the EMPID selected is 60494? SELECT DECODE(empid,38475, “Terminated”,60494, “LOA”, “ACTIVE”)FROM emp;
c. Terminatedd. ACTIVE
SELECT (TO_CHAR(NVL(SQRT(59483), “INVALID”)) FROM DUAL is a valid SQL statement.
The appropriate table to use when performing arithmetic calculations on values defined within the SELECT statement (not pulled from a table column) is
b. The table containing the column values
c. DUALD. An Oracle-defined table
Which of these is a group function?
a. avg( )
c. sqrt( )
c. sum( )
d. max( )
How long will a defined variable remain so in SQL*Plus?
a. Until the database is shut down
b. Until the instance is shut down
c. Until the statement completes
d. Until the session completes
Which is these is the default character for specifying runtime variables in SELECT statements
c. Quotation marks
A user is setting up a join operation between tables EMP and DEPT. There are some employees in the EMP table that the user wants returned by the query, but the employees are not assigned to departments yet. Which SELECT statement is most appropriate for this user?
a. select e.empid, d.head from emp e, dept d;
b. Select e.empid, d.head from emp e, dept d where e.dept# = d.dept#;
c. Select e.empid, d.head from emp e, dept d where e.dept# = d.dept# (+);
d. Select e.empid, d.head from emp e, dept d where e.dept# (+) = d.dept#;
Developer ANJU executes the following statement: CREATE TABLE animals AS SELECT * fromMASTER.ANIMALS; What is the effect of this statement?
a. A table named ANIMALS will be created in the MASTER schema with the same data as the ANIMALS table owned by ANJU
b. A table named ANJU will be created in the ANIMALS schema with the same data as the ANIMALS table owned by MASTER
c. A table named ANIMALS will be created in the ANJU schema with the same data as the ANIMALS table owned by MASTER.
d. A table named MASTER will be created in the ANIMALS schema with the same data as the ANJU table owned by ANIMALS.
User JANKO would like to insert a row into the EMPLOYEE table, which has three columns: EMPID,LASTNAME, and SALARY. The user would like to enter data for EMPID 59694, LASTNAME Harris, but no salary. Which statement would work best?
a. INSERT INTO employee VALUES (59694,’HARRIS’, NULL);
b. INSERT INTO employee VALUES (59694,’HARRIS’);
c. INSERT INTO employee (EMPID, LASTNAME, SALARY) VALUES (59694,’HARRIS’);
d. INSERT INTO employee (SELECT 59694 FROM ‘HARRIS’);
Question: Which three of the following are valid database datatypes in Oracle? (Choose three.)
Omitting the WHERE clause from a DELETE statement has which of the following effects?
a. The delete statement will fail because there are no records to delete.
b. The delete statement will prompt the user to enter criteria for the deletion
c. The delete statement will fail because of syntax error.
d. The delete statement will remove all records from the table.
Creating a foreign-key constraint between columns of two tables defined with two different datatypes will produce an error.
Dropping a table has which of the following effects on a nonunique index created for the table?
a. No effect.
b. The index will be dropped.
c. The index will be rendered invalid.
d. The index will contain NULL values.
To increase the number of nullable columns for a table,
a. Use the alter table statement.
b. Ensure that all column values are NULL for all rows.
c. First increase the size of adjacent column datatypes, then add the column.
d. Add the column, populate the column, then add the NOT NULL constraint.
Which line of the following statement will produce an error?
a. CREATE TABLE goods
b. (good_no NUMBER,
c. good_name VARCHAR2 check(good_name in (SELECT name FROM avail_goods)),
d. CONSTRAINT pk_goods_01
e. PRIMARY KEY (goodno));
f. There are no errors in this statement.
MAXVALUE is a valid parameter for sequence creation.
Note: There were many multiple choice questions related to Select statement in the job qualification employment test.
Which of the following lines in the SELECT statement below contain an error?
a SELECT DECODE(empid, 58385, “INACTIVE”, “ACTIVE”) empid
b. FROM emp
c. WHERE SUBSTR(lastname,1,1) > TO_NUMBER(‘S’)
d. AND empid > 02000
e. ORDER BY empid DESC, lastname ASC;
f. There are no errors in this statement.
Which function below can best be categorized as similar in function to an IF-THEN-ELSE statement?
a. SQRT Function
b. DECODE Function
c. NEW_TIME Function
d. ROWIDTOCHAR Function
Which two of the following orders are used in ORDER BY clauses? (choose two orders)
Note: The same SELECT command related questions may be asked in the employment test or recruitment test. So just study about these and the topics related
close to these
You query the database with this command SELECT name FROM employee WHERE name LIKE ?_a%?; Which names are displayed?
a. Names starting with ?a?
b. Names starting with ?a? or ?A?
c. Names containing ?a? as second character
d. Names containing ?a? as any letter except the firs
There are more Oracle Placement Papers, Latest Technical and HR interview questions, programming language topics, sql, sql plus, sql server, oracle database questions, DBA, DBMS, C, C++ and other technical questions free here with real candidate experiences and information.. on LatestExams.com