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

Comments
charu
By: charu
1244 days 18 hours 54 minutes ago

character manipulation function is trim

charu
By: Devi T
626 days 22 hours 6 minutes ago

character manipulation function is a date function.

Shruthi.S
By: Shruthi.S
1244 days 1 hours 34 minutes ago

trim & replace are the character manipulation functions

vivek
By: vivek
1228 days 22 minutes ago

primary key satisfies unique and not null constraints...

Ajay Anikar
By: Ajay Anikar
1223 days 21 hours 17 minutes ago

Yes, Character Manipulation is TRIM Primary Key Satisfies - Unique And NOT NULL Constraints.

yakubu
By: yakubu
1219 days 17 hours 58 minutes ago

It is quite interesting and unique for candidates i.q on ocp-exams preparation.

Ankit
By: Ankit
1186 days 19 hours 44 minutes ago

good level questions...enjoyed giving test here!

bebo
By: bebo
1178 days 14 hours 21 minutes ago

Nice test. Questions are moderate level. njoyed taking the test

Rajesh
By: Rajesh
1142 days 1 hours 17 minutes ago

primakary key satisfies unique and notnull constraints not the check constraints plz remember this ,......

Rajesh
By: Rajesh
1142 days 1 hours 16 minutes ago

and one more character manipulation function is trim not the to_date.......

aparna
By: aparna
1132 days 2 hours 9 minutes ago

ur wrong primery key holds the property of unique n not null

anju joshi
By: anju joshi
1114 days 22 hours 20 minutes ago

i agree, Character Manipulation is TRIM ....Primary Key Satisfies - Unique And NOT NULL Constraints

mohit vohra
By: mohit vohra
1114 days 20 hours 43 minutes ago

For Q9, options C and D are equivalent.

vikaas
By: vikaas
1112 days 22 hours 33 minutes ago

overall it was good test....

Ravi Shankar
By: Ravi Shankar
1099 days 3 minutes ago

Pharacter manipulation function is trim and
Primary key constraints contents unique and not null.

Irfan Kiani
By: Irfan Kiani
1066 days 15 hours 29 minutes ago

I'm trying to solve the test...very intersting

asmita
By: asmita
1033 days 5 hours 36 minutes ago

Yes, Character Manipulation is TRIM Primary Key Satisfies - Unique And NOT NULL Constraints

karuna walunj
By: karuna walunj
1005 days 17 hours 42 minutes ago

this is very usefull for exam preperation i am very thankful
of this website

pearl
By: pearl
977 days 21 hours 9 minutes ago

primary key satisfies UNIQUE and NOT NULL constraints ,i think character manipulation is trim or replace( i dont know y to_date),

Aghalya
By: Aghalya
886 days 1 hours 46 minutes ago

test is good......neat presentation of queries...got clear understanding

RAJKAMAL
By: RAJKAMAL
884 days 20 hours 45 minutes ago

Not null and unique constraints are satisfied by the Primary key constraints. The answer that the test is showing is wrong.

RAJKAMAL
By: RAJKAMAL
884 days 20 hours 44 minutes ago

Also,the DML command is Replace . I don't know why to_date falls udert the DML category.

dk
By: dk
879 days 16 hours 34 minutes ago

character manipulation function is trim
and primary key satisfies unique and not null constraints...

nagajyothi
By: nagajyothi
816 days 3 hours 15 minutes ago

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

Prabhudatta Barick
By: Prabhudatta Barick
772 days 4 hours 42 minutes ago

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.........

sathya
By: sathya
760 days 13 hours 9 minutes ago

its very usefull for learners .by sathya

sathya
By: sathya
760 days 13 hours 9 minutes ago

its very usefull for learners .by sathya

jags
By: jags
624 days 19 hours 11 minutes ago

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

sandy
By: sandy
623 days 4 hours 35 minutes ago

this test is very helpful to mee

Want to learn?

Sign up and browse through relevant courses.

or fill this simple form
Name:
Your Email:
Password:
Country:
Contact no.:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as shown in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy

Your Facebook Friends on WizIQ

More Tests By Author

ASP Server Controls
10 Questions | 419 Attempts

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

An ASP.NET Application
10 Questions | 284 Attempts

Test your basic knowledge on DATASTRUCTURES, STACK
10 Questions | 953 Attempts

Connect