当前位置:首页计算机类软件水平考试初级程序员->设有商品关系P(商品名,条形码,供应商号,价格,数量),“条

设有商品关系P(商品名,条形码,供应商号,价格,数量), “条形码”唯一标识关系P中的每一个元组,商品名不能为空,供应商号是关系P的外键。另有供应商关系S(供应商号,供应商名,地址,电话)。关系 P 中的商品名是唯一的。建立商品关系 P 的 SQL语句如下所示:

CREATE TABLE P( 商品名CHAR(30)( ),

条形码CHAR(30) ( ) ,

供应商号 CHAR(5) ,

价格 CHAR(20) ,

数量CHAR(20)

( )(供应商号) REFERENCES S(供应商号));

查询供应商及价格小于等于 2500 元且大于等于 1280 元的“电冰箱”的数量的SQL语句为:

SELECT商品名,供应商名,价格,数量

FROM P

WHERE商品名= ’电冰箱’ AND ( ) ;

将供应商号“12021”所供应的商品价格上涨3%的SQL语句为:

UPDATE P

( )

WHERE 供应商号= ’12021’;

查询供应商地址包含“西安”的供应商名及电话的SQL语句为:

SELECT供应商名,电话

FROM S

WHERE ( );

  • A.NULL
  • B.UNIQUE
  • C.NOT NULL
  • D.NOT NULL UNIQUE
答案: D
本题解析:

根据题意,关系P中商品名不能为空和商品名是唯一的,故应用NOT NULL UNIQUE来约束。

更新时间:2022-10-04 13:31
纠错

你可能感兴趣的试题

单选题

在几种不同类型的软件维护中,通常情况下()所占工作量最大。

  • A.更正性维护
  • B.适应性维护
  • C.完善性维护
  • D.预防性维护
查看答案
单选题

在()中,项目经理的权力是最小的。

  • A.强矩阵型组织
  • B.平衡矩阵组织
  • C.弱矩阵型组织
  • D.项目型组织
查看答案
单选题

在项目实施的过程中,项目经理通过项目周报中的项目进度分析图表发现机房施工进度有延期风险。项目经理立即组织相关人员进行分析,下达了关于改进措施的书面指令。该指令属于( )

  • A.检查措施
  • B.缺陷补救措施
  • C.预防措施
  • D.纠正措施
查看答案
单选题

中级数据库系统工程师,章节精选,中级数据库系统工程师

中级数据库系统工程师,章节精选,中级数据库系统工程师

中级数据库系统工程师,章节精选,中级数据库系统工程师

  • A.见图A
  • B.见图B
  • C.见图C
  • D.见图D
查看答案
单选题

中级数据库系统工程师,章节精选,中级数据库系统工程师

中级数据库系统工程师,章节精选,中级数据库系统工程师

中级数据库系统工程师,章节精选,中级数据库系统工程师

  • A.见图A
  • B.见图B
  • C.见图C
  • D.见图D
查看答案
单选题

中级数据库系统工程师,章节精选,中级数据库系统工程师

中级数据库系统工程师,章节精选,中级数据库系统工程师

  • A.u[1]<v[2]
  • B.u[1]>v[2]
  • C.u[1]<v[5]
  • D.u[1]>v[5]
查看答案
单选题

The IT service manager resigns from a project that meets the scheduleand budget. After hiring an alternativenew manager, the team is opposed to the comments from the new manager. The team is at () developmentstages。

  • A.Forming
  • B.Storming
  • C.Norming
  • D.Performing
查看答案
单选题

()is closet to Deming's definition of Quality。

  • A.Conformance to requirements
  • B.Fitness for use
  • C.Continuousimprovement of products and services
  • D.Customer focus
查看答案
单选题

The IT service manager has learned that a software canimprove the efficiency of current and future project tasks. Because the software is fresh to the Company. Theengineer is not familiar with the software. The lT service manager decides to send the highest level engineero attend the external training course. The proiect manager uses () risk strategies。

  • A.mitigation
  • B.enhancement
  • C.development
  • D.sharing
查看答案
单选题

The process control charts are used ()。

  • A.to graph what typically focuses on the prevention of a problem
  • B.to detect the problem
  • C.to reject the problem
  • D.to determine the acceptability of the sample
查看答案