一、单选题:(每题3分)
1.显示cost表的所有行,所有列,下列sql语句正确的是:
A.select * from cost;
B.select all.* from cost;
C.select all from cost;
D.select \* from cost;
正确答案:A
2.在Oracle中,有一个名为seq的序列对象,以下语句能返回下一个序列值的是:
A.select seq.ROWNUM from dual;
B.select seq.ROWID from dual;
C.select seq.CURRV AL from dual;
D.select seq.NEXTV AL from dual;
正确答案:D
3.在Oracle中,获得当前系统时间的查询语句是:
A.sysdate;
B.select sysdate;
C.select sysdate from dual;
D.select sysdate from common;
正确答案:C
4.test表包含一列date类型数据,向该列插入2008年8月8日8点8分8秒后并以“2008-08-08 08:08:08”格式显示数据,下列sql语句正确的是:
A.insert into test values
(to_char('2008-08-08 08:08:08','yyyy-mm-dd hh24:mi:ss'));
select to_char(c1,'yyyy-mm-dd hh24:mi:ss') from test;
B.insert into test values
(to_date('2008-08-08 08:08:08','yyyy-mm-dd hh24:mi:ss'));
select to_date(c1,'yyyy-mm-dd hh24:mi:ss') from test;
C.insert into test values
(to_char('2008-08-08 08:08:08','yyyy-mm-dd hh24:mi:ss'));
select to_date(c1,'yyyy-mm-dd hh24:mi:ss') from test;
D.insert into test values
(to_date('2008-08-08 08:08:08','yyyy-mm-dd hh24:mi:ss'));
select to_char(c1,'yyyy-mm-dd hh24:mi:ss') from test;