Test Your Basic SQL Skills

Which is a character manipulation function?
TRIM
REPLACE
TRUNC
TO_DATE
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
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.
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.
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
The EMP table has these columns: ENAME VARCHAR2 (35) SALARY NUMBER (8, 2) HIRE_DATE DATE 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 need to calculate the total of all salaries in the accounting department. Which group function should you use?
MAX
MIN
SUM
COUNT
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
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
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
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 constraints satisfied by Primary Key?
UNIQUE & NOT NULL
UNOQUE
NOT NULL
CHECK
What are the basic SQL statements?
SELECTION,PROJECTION & JOIN
SELECT
PROJECTION
JOIN
What is DCL?
Data control language
Data base control language
Data commit language
Data control link
To join N tables how many join conditions are required?
N +2
N+1
N-2
N-1
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.
ISQL plus is a property of?
ORACLCE
ANSI
SQL
PL/SQL
Description:

This test is aimed at determining ones knowledge of basic DML,DDL statements.
Disclaimer: Content, such as images used in the questions (if any), have been picked up from various places for the sole purpose of Instruction.

Tags:

SQL  Oracle 9i  Oracle  DBA

Discussion

Premika

this is very useful but TO_DATE is not a character manipulation function, it is a converter function from numeric to date, TRIM is a character manipulation function.
Primary key is satisfied by unique and notnull keys not by the check key.

17 days 16 minutes ago

Rashmi B

yes i agree.
TO_DATE is not a character manipulation function...
TRIM is the right answer.
What constraints satisfied by Primary key?
should be UNIQUE AND NOT NULL.

22 days 20 hours 1 minutes ago

Rajeev Chowdary Machineni

this test is very helpful.....

28 days 17 hours 58 minutes ago

Hemanth

What constraints satisfied by Primary key? For this question the answer
should be UNIQUE AND NOT NULL not CHECK...

41 days 19 hours 34 minutes ago

Gomathi

TO_DATE is not a character manipulation function...
TRIM is the right answer

52 days 1 hours 25 minutes ago

Vijay

In sql what is the meaning of DATETIMESTAFF?

342 days 22 hours 14 minutes ago

Narendra Kumar

TO_date is not character manipulation function.....

358 days 19 hours 25 minutes ago

Girish Deshpande

TO_date is not character manipulation function.....

378 days 15 hours 9 minutes ago

sandy

this test is very helpful to mee

1194 days 23 hours 43 minutes ago

jags

There ae some wrong answers in this test better they should correct this

1196 days 14 hours 19 minutes ago

Your Facebook Friends on WizIQ

More Tests By Author

ASP Server Controls
10 Questions | 543 Attempts

ASP.NET, Namespaces ASP.NET
10 Questions | 1846 Attempts

An ASP.NET Application
10 Questions | 363 Attempts