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

Gomathi

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

3 days 10 hours 15 minutes ago

Vijay

In sql what is the meaning of DATETIMESTAFF?

294 days 7 hours 5 minutes ago

Narendra Kumar

TO_date is not character manipulation function.....

310 days 4 hours 16 minutes ago

Girish Deshpande

TO_date is not character manipulation function.....

330 days ago

sandy

this test is very helpful to mee

1146 days 8 hours 34 minutes ago

jags

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

1147 days 23 hours 9 minutes ago

sathya

its very usefull for learners .by sathya

1283 days 17 hours 7 minutes ago

sathya

its very usefull for learners .by sathya

1283 days 17 hours 7 minutes ago

Prabhudatta Barick

I found the answer of question
What constraints satisfied by Primary key answer
should be UNIQUE AND NOT NULL
bUT answer given here is CHECK how come it is true??????
I need clarification regarding this.........

1295 days 8 hours 41 minutes ago

nagajyothi

enjoyed the test and v r glad if you provide correct answers.

1339 days 7 hours 14 minutes ago

Your Facebook Friends on WizIQ

More Tests By Author

ASP Server Controls
10 Questions | 534 Attempts

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

An ASP.NET Application
10 Questions | 356 Attempts