Jagran Prakashan Limited

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

JAGRAN PRAKASHAN LIMITED

NAME:____________________________ M.M:-15
PHONE NO:_________________________ DURATION:-45 mins

Question: 1
Which SELECT statement should you use if you want to display unique combinations of the
POSITION and MANAGER values from the EMPLOYEE table?
A. SELECT DISTINCT position, manager
FROM employee;
B. SELECT position, manager DISTINCT
FROM employee;
C. SELECT position, manager
FROM employee;
D. SELECT position, DISTINCT manager
FROM employee;

Question: 2
Which is an /SQL*Plus command?
A. INSERT
B. UPDATE
C. SELECT
D. DESCRIBE
E. DELETE
F. RENAME

Question: 3
You need to produce a report for mailing labels for all customers. The mailing label must have
only the customer name and address. The CUSTOMERS table has these columns:
CUST_ID NUMBER(4) NOT NULL
CUST_NAME VARCHAR2(100)
CUST_ADDRESS VARCHAR2(150)
CUST_PHONE VARCHAR2(20)
Which SELECT statement accomplishes this task?
A. SELECT*
FROM customers;
B. SELECT name, address
FROM customers;
C. SELECT id, name, address, phone
FROM customers;
D. SELECT cust_name, cust_address
FROM customers;
E. SELECT cust_id, cust_name, cust_address, cust_phone
FROM customers;.
Question: 4
Which two statements are true regarding the ORDER BY clause? (Choose two)
A. The sort is in ascending by order by default.
B. The sort is in descending order by default.
C. The ORDER BY clause must precede the WHERE clause.
D. The ORDER BY clause is executed on the client side.
E. The ORDER BY clause comes last in the SELECT statement.
F. The ORDER BY clause is executed first in the query execution.

Question: 5
Evaluate these two SQL statements:
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?
A. The two statements produce identical results.
B. The second statement returns a syntax error.
C. There is no need to specify DESC because the results are sorted in descending order by
default.
D. The two statements can be made to produce identical results by adding a column alias for the
salary column in the second SQL statement.

Question: 6
You want to use a function in you column clause of a SQL statement. The NVL function
accomplishes which of the following tasks?
A. Assists in the distribution of output across multiple columns.
B. Enables you to specify alternate output for non-NULL column values.
C. Enables you to specify alternated out for NULL column values.
D. Nullifies the value of the column out put.

Question: 7
The EMPloyee table contains these columns:
Empno Number(4)
Ename Varchar2(10)
job varchar2(10)
sal Varchar2(10)
You need to display the employees information by using this query.
How many columns are presented after executing this query:
SELECT Empno||','||Ename||','||Job "Employee Information" FROM employee;
A) 1
B) 2
C) 3
D) 0
E) 4
Question: 8
You need to display the last names of those employees who have the letter “A” as the second
character in their names.
Which SQL statement displays the required results?
A. SELECT last_name
FROM EMP
WHERE last_name LIKE ‘_A%’;
B. SELECT last_name
FROM EMP
WHERE last name =’*A%’
C. SELECT last_name
FROM EMP
WHERE last name =’_A%’;
D. SELECT last_name
FROM EMP
WHERE last name LIKE ‘*A%’

Question: 9
Evaluate this SQL statement:
SELECT c.customer_id, o.order_id, o.order_date, p.product_name
FROM customer c, curr_order o, product p
WHERE customer.customer_id = curr_order.customer_id
AND o.product_id = p.product_id
ORDER BY o.order_amount;
This statement fails when executed. Which change will correct the problem?
A. Include the ORDER_AMOUNT column in the SELECT list.
B. Use the table name in the ORDER BY clause.
C. Remove the table aliases from the WHERE clause.
D. Use the table aliases instead of the table names in the WHERE clause.
E. Remove the table alias from the ORDER BY clause and use only the column name.

Question: 10
For which task would you use the WHERE clause in a SELECT statement?
A. to designate the ORDER table location
B. to compare PRODUCT_ID values to 7382
C. to display only unique PRODUCT_ID values
D. to restrict the rows returned by a GROUP BY clause

Question: 11
The EMP table contains these columns:
LAST NAME VARCHAR2(25)
SALARY NUMBER(6,2)
DEPARTMENT_ID NUMBER(6)
You need to display the employees who have not been assigned to any department.
You write the SELECT statement:
SELECT LAST_NAME, SALARY, DEPARTMENT_ID
FROM EMP
WHERE DEPARTMENT_ID = NULL;
What is true about this SQL statement?
A. The SQL statement displays the desired results.
B. The column in the WHERE clause should be changed to display the desired results.
C. The operator in the WHERE clause should be changed to display the desired results.
D. The WHERE clause should be changed to use an outer join to display the desired results.

Question: 12
You are sorting data in a table in you SELECT statement in descending order. The column you
are sorting on contains NULL records, where will the NULL record appears?
A. At the beginning of the list.
B. At the end of the list.
C. In the middle of the list.
D. At the same location they are listed in the unordered table.

Question: 13
Examine the description of the STUDENTS table:
STD_ID NUMBER(4)
COURSE_ID VARCHARD2(10)
START_DATE DATE
END_DATE DATE.
Which two aggregate functions are valid on the START_DATE column? (Choose two)
A. SUM(start_date)
B. AVG(start_date)
C. COUNT(start_date)
D. AVG(start_date, end_date)
E. MIN(start_date)
F. MAXIMUM(start_date)

Question: 14
Evaluate the SQL statement:
SELECT ROUND(TRUNC(MOD(1600,10),-1),2)
FROM dual;
What will be displayed?
A. 0
B. 1
C. 0.00
D. An error statement

Question: 15
Which clause should you use to exclude group results?
A. WHERE
B. HAVING
C. RESTRICT
D. GROUP BY
E. ORDER BY

You might also like