
VERCO.JSC CÔNG TY CỔ PHẦN TÁI CẤU TRÚC DOANH NGHIỆP VIỆT
Trụ sở : Tầng 1 tòa Sunrise Building 2, KĐT Sài Đồng, Long Biên, Hà Nội
Điện thoại: 0438.533 533 – Fax: 0436.525 808 – Web: verco.vn
Số:……………
Hà Nội, ngày…….tháng……..năm 2017
Oracle SQL Exam No. 2
Question 1:
Which SELECT statement should you use to extract the year from the system
date and display it in the format "1998"?
A. SELECT TO_CHAR(SYSDATE,'yyyy')
FROM dual;
B. SELECT TO_DATE(SYSDATE,'yyyy')
FROM dual;
C. SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;
D. SELECT DECODE(SUBSTR(SYSDATE, 8), 'year')
FROM dual;
E. SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy')
FROM dual;
Question 2:
You need to change the definition of an existing table. The COMMERCIALS table
needs its DESCRIPTION column changed to hold varying length characters up
to 2000 bytes. The column can currently hold 1000 bytes per value. The table
contains 20000 rows.
Which statement is valid?
A. ALTER TABLE commercials
MODIFY (description CHAR2(2000));
B. ALTER TABLE commercials
CHANGE (description CHAR2(2000));
C. ALTER TABLE commercials
CHANGE (description VARCHAR2(2000));
D. ALTER TABLE commercials
MODIFY (description VARCHAR2(2000));
E. You cannot increase the size of a column if the table has rows.
Question 3:
Management has asked you to calculate the value 12*salary* commission_pct
for all the employees in the EMP table. The EMP table contains these columns:
LAST NAME
VARCNAR2(35)
NOT
NULL SALARY
NUMBER(9,2)
NOT
NULL
COMMISION_PCT
NUMBER(4,2)
Which statement ensures that a value is displayed in the calculated
columns for all employees?
A. SELECT last_name, 12*salary* commission_pct
FROM emp;
B. SELECT last_name, 12*salary* (commission_pct,0)
FROM emp;
Oracle SQL Exam No. 2 -2005
Page 1 of 18
Bình luận