Which is a character manipulation function?
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=NULL
SELECT customer_id, customer_name FROM customers WHERE postal_code IS NULL
SELECT customer_id, customer name FROM customers WHERE posta_code='_______'
SELECT customer_id, customer_name FROM customers WHERE postal_code CONTAINS NULL
Which statements is not correctly describe the functions and use of constraints?
Constraints prevent the deletion of a table if there are dependencies.
constraints enforce rules at the table level
constraints enforce rules at the view level
constraint make complex queries easy
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 fails because the multiple-row sub query cannot be used with the comparison operator.
the main query executes with all the values returned by the subquery
the main query executes with the last value returned by the subquery
the main query executes with the first value returned by the subquery
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, 'FMDAY, DDD Month, YYYY') FROM dual
SELECT TO_CHAR(SYSDATE, 'FM Day, DD Month YYYY') FROM dual
SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month 'YYY') FROM dual
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)* 365 > 5
SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)/365 > 5
SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE > 5
SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE>5
You need to calculate the total of all salaries in the accounting department. Which group function should you use?
A sub query can be used to _________.
retrieve data based on an unknown condition
convert data to a different format
sort data in a specific order
create groups of data
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 WHERE order_total >= 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 HAVING order total BETWEEN 100 and 200
SELECT customer_id, order_id, order_total FROM orders RANGE ON order_total (100 AND 200) INCLUSIVE
What does the TRUNCATE statement do?
removes all columns from a table
shortens the tale to 10 rows
removes all rows from a table
removes the table
What is true regarding sub queries?
The inner query returns a value to the outer query.
The outer query must return a value to the inner query.
The outer query always sorts the results of the inner query.
The inner query always sorts the results of the outer query.
What constraints satisfied by Primary Key?
UNIQUE & NOT NULL
What are the basic SQL statements?
SELECTION,PROJECTION & JOIN
What is DCL?
Data control link
Data commit language
Data base control language
Data control language
To join N tables how many join conditions are required?
What is an aggregate function?
Takes many rows as input and gives no output.
Takes many rows as input and gives many output.
Takes one rows as input and gives one output.
Takes many rows as input and gives one output.
ISQL plus is a property of?