一级女人毛片人一女人-一级女性大黄生活片免费-一级女性全黄久久生活片-一级女性全黄生活片免费-国产美女在线一区二区三区-国产美女在线观看

始創于2000年 股票代碼:831685
咨詢熱線:0371-60135900 注冊有禮 登錄
  • 掛牌上市企業
  • 60秒人工響應
  • 99.99%連通率
  • 7*24h人工
  • 故障100倍補償
您的位置: 網站首頁 > 幫助中心>文章內容

Oracle中的null測試題

發布時間:  2012/7/27 17:43:40

create table TABLE1(

ID     VARCHAR2(10) not null,

GRZHYE NUMBER(10,2),

GMSFHM VARCHAR2(18),
-
 

RYLB  varchar2(10),

CARDNO VARCHAR2(20));

comment on column TABLE1.ID  is '個人編號';

comment on column TABLE1.GRZHYE  is '個人賬戶余額';

comment on column TABLE1.GMSFHM  is '公民身份號碼';

comment on column TABLE1.RYLB  is '人員類別';

comment on column TABLE1.CARDNO  is '卡號';

alter table TABLE1  add constraint PK_TABLE1 primary key (ID);

create index IDX_TABLE1_GMSFHM on TABLE1 (GMSFHM)  tablespace YB;

create index idx_table1_cardno on TABLE1 (cardno);

表中的數據如下:

id, grzhye, gmsfhm,             rylb,     cardno

1,   100,    123456770707771,  01,        1401000001

2,   null,   123456770707772,  null,      null

3,   200,    123456770707773,  03,        1401000003

1. select count(*)  from table1 where 1=2;                結果為(           )

A.  null          B. 0          C.  1     D. 會報錯

2.  select sum(grzhye)  from table1 where 1=2;           結果為(           )

A.  null          B.  0        C.  1     D. 會報錯

3.  select sum(grzhye)  from table1;                    結果為(           )

A.  null         B.  0        C. 300       D. 會報錯

4.  select count(*)  from (select sum(grzhye)  from table1 where 1=2);    結果為(       )

A.  0         B.  1        C. null       D. 會報錯

5.  select  avg(grzhye) from table1;                     結果為(         )

A.  null         B.  0        C. null       D. 150     E. 100

6. 執行以下語句會 (         )

alter table TABLE1 add constraint udx_table1_cardno unique (CARDNO);

A. 成功   B. 報錯

7. select * from table1 where cardno is null; 如果優化方式按規則,是否會用到idx_table1_cardno索引(       )

A.會   B.不會

8. select * from table1 where cardno =’123’; 如何優化方式按規則,是否會用到idx_table1_cardno索引(       )

A.會   B.不會

9. select min(grzhye) from table1;     結果是(           )

A. null     B. 100   C.  報錯

10. select id||cardno from table1 where id = ‘2’;             結果會是:(         )

A. null    B. 2     C. 報錯

11. Select 100 + null from dual;      結果是(       )

A. null   B. 100    C. 報錯

12. Select 100 * null from dual;      結果是(       )

A. null   B. 100    C. 0        D. 報錯

13. Select 100 / null from dual;      結果是(      )

A. null   B. 100    C. 0        D. 報錯

14. Select  null/0 from dual;      結果是(       )

A. null   B. 0    C. 報錯

15. select rylb,sum(grzhye)/count(rylb) from table1 group by rylb;

會查到(    )條記錄

A. 0條   B. 2條   C. 3條  D. 報錯

16.  select 100/sum(grzhye) from table1 where id='2';      結果是: (       )

A. null    B. 0   C. 100   D. 報錯

17.  update table1 set cardno = null where id='2';

update table1 set cardno = ‘’ where id='2';

以上兩句,(        )

A. 效果是相同的   B. 只有第一句成功   C. 只有第二句成功

18.  select * from table1 where cardno='';       會查到幾條記錄  (     )

A. 0    B. 1   C. 報錯

19.  select * from table1 where cardno is null;         會查到幾條記錄  (     )

A. 0    B. 1   C. 報錯

20.  select count(cardno) from table1;     會查到幾條記錄  (     )

A. 0    B. 2  C.3   D. 報錯


本文出自:億恩科技【www.laynepeng.cn】

服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經營性ICP/ISP證:贛B2-20080012
  • 服務器/云主機 24小時售后服務電話:0371-60135900
  • 虛擬主機/智能建站 24小時售后服務電話:0371-60135900
  • 專注服務器托管17年
    掃掃關注-微信公眾號
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權所有  地址:鄭州市高新區翠竹街1號總部企業基地億恩大廈  法律顧問:河南亞太人律師事務所郝建鋒、杜慧月律師   京公網安備41019702002023號
      1
     
     
     
     

    0371-60135900
    7*24小時客服服務熱線