-
CREATE TABLE test(t_idINT,t_nmae CHAR(10))后,增加t_sex字段,以下语句正确的是()。
A . ALTER TABLE test ADD t_sex CHAR(2)
B . ALTER TABLE test ADD t_sex
C . ALTER TABLE test ALTER t_sex CHAR(2)
D . ALTER TABLE test DROP(t_sex CHAR(2))
-
默认约束是在CREATE TABLE或ALTER TABLE语句中定义的,删除表的时候默认约束也随之删除了。
A . 正确
B . 错误
-
Examine the command that is used to create a table: SQL> CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER(6), oamt NUMBER(10,2)) TABLESPACE users; Which two statements are true about the effect of the above command) ()
A . A CHECK constraint is created on the OID column.
B . A NOT NULL constraint is created on the OID column.
C . The ORDERS table is the only object created in the USERS tablespace.
D . The ORDERS table and a unique index are created in the USERS tablespace.
E . The ORDERS table is created in the USERS tablespace and a unique index is created on the OIDcolumn in the SYSTEM tablespace.
-
一般客户号分为正式客户号和()客户号
A . A、潜在
B . B、特殊
C . C、非正式
-
A user needs to create a trigger that will update table T2 whenever a row is added to table T1. Assuming the user has all appropriate privileges for table T2, which privilege is required on table T1 to create the trigger?()
A . REFERENCES
B . SELECT
C . UPDATE
D . ALTER
-
You want to create a temporary table while executing a procedure in a form. Which statement is true?()
A . You cannot create a table form within Forms.
B . You must use the FORMS_DDL built-in to create the table.
C . You must use the DBMS_DYNAMIC_DDL package to create the table.
D . You can write the CREATE TABLE statement directly into the trigger.
-
假设在数据库中创建了用户test,需要为其授予CREATE ANY TABLE系统权限,可以使用如下()语句。
A . GRANT CREATE ANY TABLE test
B . GRANT CREATE ANY TABLE TO test
C . TAKE CREATE ANY TABLE TO test
D . ALTER CREATE ANY TABLE TO test
-
Examine the command that is used to create a table: SQL> CREATE TABLE orders(oid NUMBER(6) PRIMARY KEY, odate DATE, ccode NUMBER (6), oamtNUMBER(10,2)) TABLESPACE users; Which two statements are true about the effect of the above command()
A . A CHECK constraint is created on the OID column.
B . A NOT NULL constraint is created on the OID column.
C . The ORDERS table is the only object created in the USERS tablespace.
D . The ORDERS table and a unique index are created in the USERS tablespace.
E . The ORDERS table is created in the USERS tablespace and a unique index is created on the OID columnin the SYSTEM tablespace.
-
客户号管理是指以客户号为索引,对同一个客户在系统中记录的各种信息按客户号进行归纳的管理方式,以达到采集和()客户信息的目的,并对客户评定等级,实现以客户为中心的服务理念。客户号管理包括客户号的编制,客户号的生成,客户号的归集以及客户号的注销。
A . 管理
B . 分析
C . 服务
-
管理员在执行create database benet usebenet create table benet01(column1int,column2int)语句时,发生了错误,如何修改()
A . 分别执行每一句
B . 将各个语句使用go分开再执行
C . 不能将表格命名为benet01
D . 不能将数据库命名为benet
-
Evaluate the CREATE TABLE statement: CREATE TABLE products (product_id NUMBER (6) CONSTRAINT prod_id_pk PRIMARY KEY, product_name VARCHAR2 (15)); Which statement is true regarding the PROD_ID_PK constraint?()
A . It would be created only if a unique index is manually created first.
B . It would be created and would use an automatically created unique index.
C . It would be created and would use an automatically created nonunique index.
D . It would be created and remains in a disabled state because no index is specified in the command.
-
Which is a valid CREATE TABLE statement? ()
A . CREATE TABLE EMP9$# AS (empid number(2));
B . CREATE TABLE EMP*123 AS (empid number(2));
C . CREATE TABLE PACKAGE AS (packid number(2));
D . CREATE TABLE 1EMP_TEST AS (empid number(2))
-
设有订单表0rder(其中包含字段:订单号,客户号. 职员号,签订日期,金额),删除2002年1月1日以前签订的 订单记录,正确的SQL命令是( )^
A . DELETE TABLE order WHERE签订日期<{^2002-1-1}
B . DELETE TABLE order WHILE签订日期<{^2002-1-1}
C . DELETE FROM order WHERE签订日期<{^2002-1.1}
D . DELETE FROM order WHILE签订日期<{^2002一1—1}
-
更改“成绩表”以添加新列“column_a” CREATE TABLE 成绩表 ADD column_a VARCHAR(20) NULL
-
CREATE TABLE是______功能的SQL语句。CREATE TABLE是______功能的SQL语句
-
使用SQL的CREATE TABLE语句建立数据库表时,为了说明主关键字应该使用关键词 KEY。使用SQL的CREATE TABLE语句建立数据库表时,为了说明主关键字应该使用关键词 KEY。
-
The following statements:CREATE TABLE t1 (col1 INT NOT NULL, PRIMARY KEY(col1)); CREATE TA
The following statements:CREATE TABLE t1 (col1 INT NOT NULL, PRIMARY KEY(col1)); CREATE TABLE t2 (col1 INT NOT NULL, col2 CHAR(1) NOT NULL, PRIMARY KEY (col1, col2), FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE CASCADE ON UPDATE RESTRICT); CREATE TABLE t3 (col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (col1, col2),FOREIGN KEY (col1) REFERENCES t1 (col1) ON DELETE NO ACTION ON UPDATE RESTRICT);INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1, ‘a‘), (1, ‘b‘), (2,‘c‘); INSERT INTO t3 VALUES (1, 100), (2, 200), (2,300);How many rows will be deleted by the following DELETE statement? DELETE FROM t1 WHERE col1= 1;()
A.4
B.3
C.1
D.0
-
在Visual FoxPro中,下列关于SQL表定义语句(CREATE TABLE)的说法错误的是()。A.可以定义一个新的
在Visual FoxPro中,下列关于SQL表定义语句(CREATE TABLE)的说法错误的是()。
A.可以定义一个新的基本表结构
B.可以定义数据库表中的主关键字
C.可以定义表的域完整性、字段有效性规则等
D.对自由表,同样可以实现其完整性、有效性规则等信息的设置
-
实验七 MySQL数据完整性 一、实验目的 1. 了解约束的各种类型 2. 掌握使用SQL语句CREATE TABLE定义约束的方法 3. 掌握使用SQL语句ALTER TABLE增加或删除约束的方法 4. 体验用ENUM和SET数据类型取代其它数据库中的CHECK约束 二、实验环境 教学实验选用MySQL数据库,提供的MySQL和SQLyog软件仅适用于已安装Windows XP或更高版本Windows操作系统的计算机。请下载“实验5脚本.rar”,准备好该实验所需要的数据源。 三、实验内容及步骤 用图形化客户端工具SQLyog完成如下示例操作。(要求验证) MySQL支持的常用约束类型有6种: 主键(primary key)约束 外键(foreign key)约束 非空(not NULL)约束 唯一性(unique )约束 默认值(default)约束 自增约束(auto_increment) 1. 主键(primary key)约束 ① 在SQLyog中利用sql指令在mydb
-
考虑如下数据表和查询,如何添加索引功能提高查询速度?()Create table mytable(Id int,Name
考虑如下数据表和查询,如何添加索引功能提高查询速度?()Create table mytable(Id int,Name char(100),Address1 varchar(100),Address2 varchar(100),Zipcode varshar(10),Sity varchar(50),Province varchar(2))Select id, varcharFrom mytableWhe
A.给Zipcode添加全文的索引
B.给Name添加索引
C.给Id添加索引,然后给Name和Zipcode分别添加索引
D.给id添加索引
-
某医院住院部信息系统中有病人表R(住院号,姓名,性别,科室号,病房,家庭住址),“住院号”唯一标识表R中的每一个元组,“性别”的取值只能为M或F,“家庭住址”包括省、市、街道、邮编,要求科室号参照科室关系D中的科室号;科室关系D(科室号,科室名,负责人,联系电话),“科室号”唯一标识关系D中的每一个元组。a.创建关系R的SQL语句如下:CREATE TABLE R(住院号CHAR(8) (),姓
A.住院号
B. 姓名
C. 病房
D. 家庭住址
-
企业职工和部门的关系模式如下所示,其中部门负责人也是一个职工。职工(职工号,姓名,年龄,月薪,部门号,电话,地址)部门(部门号,部门名,电话,负责人代码,任职时间)请将下面的SQL语句空缺部分补充完整。CREATE TABLE部门(部门号CHAR(4) PRIMARY KEY,部门名CHAR(20),电话CHAR(13),负责人代码CHAR(5),任职时间DATE,FOREIGN KEY())
A.(电话)REFERENCES(职工电话)
B.(部门号)REFERENCES部门(部门号)
C.(部门号)REFERENCES职工(部门号)
D.(负责人代码)REFERENCES 职工(职工号)
-
公司有一个客户的数据表,此表的建立语句如下:CREATE TABLE Customers(CustomerID int NOT NULL, CustomerName varchar(50) NOT NULL, ContactName varchar(30) NULL, Phone varchar(20) NULL, Country varchar(30) NOT NULL, CONSTRAINT
A、SELECT Country FROM CustomersGROUP BY Country HAVING COUNT (Country)>=10
B、SELECT TOP 10 Country FROM Customers
C、SELECT TOP 10 Country FROM Customers FROM (SELECT DISTINCT Country FROM Customers) AS XGROUP BY Country HAVING COUNT(*)>= 10
D、SET ROWCOUNT 10SELECT Country, COUNT (*) as “NumCountries”FROM CustomersGROUP BY Country ORDER BY NumCountries, Desc
-
使用如下关系:客户(客户号,名称,联系人,邮政编码,电话号码)产品(产品号,名称,规格说明,单价)订购单(订单号,客户号,订购日期)订购单名细(订单号,序号,产品号,数量)查询客户名称中有"网络"二字的客户信息的正确命令是______。
A.SELECT*FROM客户FOR名称LIKE"%网络%"
B.SELECT*FROM客户FOR名称="%网络%"
C.SELECT*FROM客户WHERE名称="%网络%"
D.SELECT*FROM客户WHERE名称LIKE"%网络%"