Which is a character manipulation function?
ISQL plus is a property of?
What is an aggregate function?
Takes many rows as input and gives one output.
Takes one rows as input and gives one output.
Takes many rows as input and gives many output.
Takes many rows as input and gives no output.
To join N tables how many join conditions are required?
What is DCL?
Data control language
Data base control language
Data commit language
Data control link
What are the basic SQL statements?
SELECTION,PROJECTION & JOIN
What constraints satisfied by Primary Key?
UNIQUE & NOT NULL
What is true regarding sub queries?
The inner query always sorts the results of the outer query.
The outer query always sorts the results of the inner query.
The outer query must return a value to the inner query.
The inner query returns a value to the outer query.
What does the TRUNCATE statement do?
removes the table
removes all rows from a table
shortens the tale to 10 rows
removes all columns from a table
The ORDERS table has these columns
ORDER_ID-NUMBER (4)-NOT NULL
CUSTOMER_ID- NUMBER (12)-NOT NULL
ORDER_TOTAL-NUMBER (10, 2)
The ORDERS table tracks the Order number, the order total and the customer to whom the Order belongs. Which two statements retrieve orders with an inclusive total that ranges between 100.00 and 200.00 dollars?
SELECT customer_id, order_id, order_total FROM orders RANGE ON order_total (100 AND 200) INCLUSIVE
SELECT customer_id, order_id, order_total FROM orders HAVING order total BETWEEN 100 and 200
SELECT customer_id, order_id, order_total FROM orders WHERE order_total BETWEEN 100 and 200
SELECT customer_id, order_id, order_total FROM orders WHERE order_total >= 100 and <=200
A sub query can be used to _________.
create groups of data
sort data in a specific order
convert data to a different format
retrieve data based on an unknown condition
You need to calculate the total of all salaries in the accounting department. Which group function should you use?
The EMP table has these columns:
ENAME VARCHAR2 (35)
SALARY NUMBER (8, 2)
Management wants a list of names of employees who have been with the company for more than five yeas. Which SQL statement displays the required results?
SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE>5
SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE > 5
SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)/365 > 5
SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)* 365 > 5
You would like to display the system date in the format *Monday, 01 June, 2001* Which SELECT statement should you use?
SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month 'YYY') FROM dual
SELECT TO_CHAR(SYSDATE, 'FM Day, DD Month YYYY') FROM dual
SELECT TO_CHAR(SYSDATE, 'FMDAY, DDD Month, YYYY') FROM dual
You define a multiple-row subquery in the WHERE clause of an SQL query with a comparison operator"="
What happens when the main query is executed?
the main query executes with the first value returned by the subquery
the main query executes with the last value returned by the subquery
the main query executes with all the values returned by the subquery
The main query fails because the multiple-row sub query cannot be used with the comparison operator.
Which statements is not correctly describe the functions and use of constraints?
constraint make complex queries easy
constraints enforce rules at the view level
constraints enforce rules at the table level
Constraints prevent the deletion of a table if there are dependencies.
The CUSTOMERS table has these columns:
CUSTOMER_ID NUMBER (4) NOT NULL
CUSTOMER_NAME VARCHAR2 (100)
STREET_ADDRESS VARCHAR2 (150)
CITY_ADDRESS VARCHAR2 (50)
STATE_ADDRESS VARCHAR2 (50)
PROVINCE_ADDRESS VARCHAR2 (50)
COUNTRY_ADDRESS VARCHAR2 (50)
POSTAL_CODE VARCHAR2 (12)
CUSTOEMR_PHONE VARCHAR2 (20)
Which statement finds the rows in the CUSTOMERS table that do not have a postal code
SELECT customer_id, customer_name FROM customers WHERE postal_code CONTAINS NULL
SELECT customer_id, customer name FROM customers WHERE posta_code='_______'
SELECT customer_id, customer_name FROM customers WHERE postal_code IS NULL
SELECT customer_id, customer_name FROM customers WHERE postal_code=NULL