网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
你要关闭SALES表中UNIT_PRICE列的非NULL约束。下列哪个语句能完成这个操作?()
A

alter table sales modify(unit_prices null)

B

alter table sales modify(unit_prices not null)

C

alter table sales add(unit_prices null)

D

alter table sales add(unit_prices not null)


参考答案

参考解析
解析: 暂无解析
更多 “单选题你要关闭SALES表中UNIT_PRICE列的非NULL约束。下列哪个语句能完成这个操作?()A alter table sales modify(unit_prices null)B alter table sales modify(unit_prices not null)C alter table sales add(unit_prices null)D alter table sales add(unit_prices not null)” 相关考题
考题 以下语句错误的是( )A. alter table emp delete column addcolumn;B. alter table emp modify column addcolumn char(10);C.alter table emp change addcolumn addcolumn int;D. alter table emp add column addcolumn int;

考题 下列说法正确的是()A.alter table user drop column sex;B.alter table user add sex varchar(20);C.alter table user drop sex;D.alter table user modify id int primary key;

考题 删除学生表STUD中关于学号XH必须取唯一值的约束。实现该功能的正确SQL语句是______。A.ALTER TABLE STUD ADD XH UNIQUEB.ALTER TABLE STUD MODIFY XH UNIQUEC.ALTER TABLE STUD DROP UNIQUE(XH)D.ALTER TABLE STUD MODIFY UNIQUE(XH)

考题 一个信息表student,要求它由学号sno,姓名sname,性别sex,年龄age,4个属性组成。现在对这个现有的表增加一个入学时间cometime字段为日期型,下列语句正确的是______。A.AITER TABLE student ADD cometime DATE NOT NULL;B.ALTER TABLE student ADD cometime DATE;C.ALTER TABLE student DROP cometime DATE NOT NULL;D.ALTER TABLE student MODIPY cometime DATE;

考题 一个学生信息表student,要求它由学号sno,姓名sname,性别sex,年龄age,4个属性组成。现在对这个现有的表增加一个入学时间cometime字段为日期型,下列语句正确的是A.ALTER TABLE student ADD cometime DATE NOT NULL;B.ALTER TABLE student ADD cometime DATE;C.ALTER TABLE student DROP cometime DATE NOT NULL:D.ALTER TABLE student MODIFY cometime DATE;

考题 删除学生表STUD中关于学号XH必须取惟一值的约束。实现该功能的正确SQL语句是 ______。A.ALTER TABLE STUD ADD XH UNIQUEB.ALTER TABLE STUD MODIFY XHUNIQUEC.ALTER TABLE STUD DROP UNIQUE(XH)D.ALTER TABLE STUD MODIFY UNIQUE(XH)

考题 如果希望更新表authors中的first_name列为非空,那么可以使用哪个语句?()A、alter table authors add first_name not nullB、alter table authors modify first_name not nullC、alter table authors alter first_name not nullD、alter table authors drop first_name not null

考题 下列有关NOT NULL约束条件的表述中,哪两项是正确的?()A、Oracle Server会为未命名的NOT NULL约束条件创建名称。B、可以在表级或列级定义NOT NULL约束条件。C、NOT NULL约束条件要求列中的每个值都是唯一的。D、有NOT NULL约束条件的列默认可以包含空值。E、不能使用ALTER TABLE ADD CONSTRAINT语句向现有列添加NOT NULL约束条件。

考题 为表TEST中ID列添加主键约束的语法是()A、ALTER  TABLE  TEST  CHANGE( ID  INT  PRIMARY  KEY)B、ALTER  TABLE  TEST  ADD( ID  INT  PRIMARY  KEY)C、ALTER  TABLE  TEST  MODIFY( ID  INT  PRIMARY  KEY)D、ALTER  TABLE  TEST  ADD  CONSTRAINT PK  PRIMARY KEY (ID)

考题 要向雇员表中的部门标识列添加FOREIGNKEY约束条件以引用部门表中的标识列,应该使用哪个语句()A、ALTER TABLE雇员MODIFY COLUMN dept_id_fk FOREIGN KEY(部门标识)REFERENCES部门(部门标识)B、ALTER TABLE雇员ADD CONSTRAINT dept_id_fk FOREIGNKEY(部门标识)REFERENCES部门(部门标识)C、ALTER TABLE雇员ADD FOREIGN KEY CONSTRAINT dept_id_fk ON(部门标识)REFERENCES部门(部门标识)D、ALTER TABLE雇员ADD FOREIGN KEY 部门(部门标识)REFERENCES(部门标识)

考题 在SQL Server中,修改表中列定义的正确的SQL语句是()。A、ALTER TABLE 表名 ALTER COLUMN 列名 数据类型B、ALTER TABLE 表名 ALTER 列名 数据类型C、ALTER TABLE MODIFY COLUMN 列名 数据类型D、ALTER TABLE 表名 ADD 列名 数据类型

考题 如下能正确执行的语句是()A、select * from table_name where 1=2B、truncate table table_nameC、delete from table_name where null=nullD、alter table table_name add column idd int

考题 You just issued the following statement: ALTER TABLE SALES DROP COLUMN PROFIT. Which of the following choices identifies when the column will actually be removed from Oracle?()A、Immediately following statement execution B、After the ALTER TABLE DROP UNUSED COLUMNS command is issued C、After the ALTER TABLE SET UNUSED COLUMN command is issued D、After the ALTER TABLE MODIFY command is issued

考题 Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()A、ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;B、ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;C、ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;D、ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;E、ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;F、ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;

考题 You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()A、ALTER TABLE students ADD PRIMARY KEY student_id;B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);C、ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);D、ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

考题 Examine the following statement that is used to modify the constraint on the SALES table: SQL ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE; Which three statements are true regarding the above command()A、The constraint remains valid.B、The index on the constraint is dropped.C、It allows the loading of data into the table using SQL*Loader.D、New data conforms to the constraint, but existing data is not checkedE、It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

考题 Examine the following statement that is used to modify the primary key constraint on the SALES table: SQL ALTER TABLE SALES MODIFY CONSTRAINT pk DISABLE VALIDATE; Which three statements aretrue regarding the above command()A、The constraint remains valid.B、The index on the constraint is dropped.C、It allows the loading of data into the table using SQL *Loader.D、New data conforms to the constraint, but existing data is not checked.E、It allows the data manipulation on the table using INSERT/UPDATE/DELETE SQL statements.

考题 The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()A、Column definitions cannot be altered to add DEFAULT values.B、A change to the DEFAULT value affects only subsequent insertions to the table.C、Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.D、All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

考题 发出下列语句:alter table sales drop columm profit;何时从Oracle中实际删除列?()A、执行语句后立即删除B、发出alter table drop unused columns命令之后C、发出alter table set unused columns命令之后D、发出alter table modify命令之后

考题 你要关闭SALES表中UNIT_PRICE列的非NULL约束。下列哪个语句能完成这个操作?()A、alter table sales modify(unit_prices null)B、alter table sales modify(unit_prices not null)C、alter table sales add(unit_prices null)D、alter table sales add(unit_prices not null)

考题 You are modifying a table named Product in a SQL Server 2005 database. You want to add a new column named FriendlyName to the Product table. A friendly name for each product will be stored in this column. The table currently contains data. The sales department has not yet created a friendly name for each product. FriendlyName is a required value for each product. You want to add this new column by using the least amount of effort. What should you do?()A、Define the new column as NULL.Update the FriendlyName column to the same value as the productName column. Alter the FriendlyName column to be NOT NULL.B、Define the new column as NOT NULL with a default value of ’Undefined.’C、Define the new column as NULL. Use application logic to enforce the data constraint.D、Define the new column as NULL with a default value of ’Undefined.’

考题 单选题你要关闭SALES表中UNIT_PRICE列的非NULL约束。下列哪个语句能完成这个操作?()A alter table sales modify(unit_prices null)B alter table sales modify(unit_prices not null)C alter table sales add(unit_prices null)D alter table sales add(unit_prices not null)

考题 单选题发出下列语句:alter table sales drop columm profit;何时从Oracle中实际删除列?()A 执行语句后立即删除B 发出alter table drop unused columns命令之后C 发出alter table set unused columns命令之后D 发出alter table modify命令之后

考题 单选题如果希望更新表authors中的first_name列为非空,那么可以使用哪个语句?()A alter table authors add first_name not nullB alter table authors modify first_name not nullC alter table authors alter first_name not nullD alter table authors drop first_name not null

考题 单选题The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()A Column definitions cannot be altered to add DEFAULT values.B A change to the DEFAULT value affects only subsequent insertions to the table.C Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.D All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

考题 单选题You are modifying a table named Product in a SQL Server 2005 database. You want to add a new column named FriendlyName to the Product table. A friendly name for each product will be stored in this column. The table currently contains data. The sales department has not yet created a friendly name for each product. FriendlyName is a required value for each product. You want to add this new column by using the least amount of effort. What should you do?()A Define the new column as NULL.Update the FriendlyName column to the same value as the productName column. Alter the FriendlyName column to be NOT NULL.B Define the new column as NOT NULL with a default value of ’Undefined.’C Define the new column as NULL. Use application logic to enforce the data constraint.D Define the new column as NULL with a default value of ’Undefined.’

考题 单选题You just issued the following statement: ALTER TABLE SALES DROP COLUMN PROFIT. Which of the following choices identifies when the column will actually be removed from Oracle?()A Immediately following statement execution B After the ALTER TABLE DROP UNUSED COLUMNS command is issued C After the ALTER TABLE SET UNUSED COLUMN command is issued D After the ALTER TABLE MODIFY command is issued

考题 单选题Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()A ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;B ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;C ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;D ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;E ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;F ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;