Oracle 最近听说OCP贬值了,据说大家都能随便考上了,偶特意为想考OCP和考过OCP的同学们制作了几道题目,题目看上去很简单,似乎答案可以脱口而出,如果10分钟内能够全部回答正确,偶相信你应该能够具备一个OCP所具有的思考能力了 :)
(1) A 表中有100条记录.
SELECT * FROM A WHERE A.COLUMN1 = A.COLUMN1
这个语句返回几条记录? (简单吧,似乎1秒钟就有答案了:)
(2) CREATE SEQUENCE PEAK_NO
SELECT PEAK_NO.NEXTVAL FROM DUAL --> 假设返回1
10秒中后,再次做
SELECT PEAK_NO.NEXTVAL FROM DUAL --> 返回多少?
(3) SQL> connect sys as sysdba
Connected.
SQL> insert into dual values ( ‘Y‘);
1 row created.
SQL> commit;
Commit complete.
SQL> select count(*) from dual;
COUNT(*)
----------
2
SQL> delete from dual;
commit;
-->DUAL里还剩几条记录?
JUST TRY IT .