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

题目内容 (请给出正确答案)

2、对于下列语句, () 描述是正确的。 ATLER TABLE Product Add Year DATE DEFAULT ‘2020-01-01’;

A.向Product表中增加一个名为“DATE”的属性

B.该属性有一个默认的值是“2020-01-01”

C.该属性的数据类型是字符串型

D.该属性可以被指定主码


参考答案和解析
该属性有一个默认的值是“2020-01-01”
更多 “2、对于下列语句, () 描述是正确的。 ATLER TABLE Product Add Year DATE DEFAULT ‘2020-01-01’;A.向Product表中增加一个名为“DATE”的属性B.该属性有一个默认的值是“2020-01-01”C.该属性的数据类型是字符串型D.该属性可以被指定主码” 相关考题
考题 为“歌手”表增加,一个字段“最后得分”的SQL语句是( )。A)ALTER TABLE歌手ADD最后得分F(6,2)B)ALTER DBF歌手ADD最后得分F6,2C)CHANGE TABLE歌手ADD最后得分F(6,2)D)CHANGE TABLE歌手INSERT最后得分F6,2

考题 向“仓库”表中新增一个“人数”字段,数据类型为数值型,宽度为2,正确的命令语句是( )。A)CREATE TABLE仓库ALTER人数N(2)B)CREATE TABLE仓库ADD FIELDS人数N(2)C)ALTER TABLE仓库ALTER人数N(2)D)ALTER TABLE仓库ADD人数N(2)

考题 为“部门”表增加一个“人数”字段,类型为整型,正确的语句是( )。A.ALTER TABLE部门ALTER人数IB.ALTER TABLE部门ALTER FIELDS人数IC.ALTER TABLE部门ADD人数ID.ALTER TABLE部门ADD FIELDS人数I

考题 针对Sets接口,下列哪项是正确的?() A.s.add(2)B.s.add(newInteger(2))C.s.add(“2”)D.s.add(newjava.util.Date())

考题 The EMPLOYEES table has these columns:Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:What 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 at 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.

考题 下面结构体的定义语句中,不正确的是______。A.structdate { int month; int day; int year; } Struct date datel;B.stmctdate { intmonth; int day; int year; } datel;C.struct { int month; int day; int year; } date 1;D.#define DATE stmct date DATE { int month; int day; int year; }datel;

考题 已知PROJECT(J#,JNAME,DATE),要求若没有视图或约束引用属性DATE,则删除该列,若有视图或约束引用该属性,则不删除该列。可实现上述语义的语句是______。A.DELETE TABLE PROJECT DROP DATE CASCADEB.DELETE TABLE PROJECT DROP DATE RESTRICTC.ALTER TABLE PROJECT DROP DATE CASCADED.ALTER TABLE PROJECT DROP DATE RESTRICT

考题 一个信息表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;

考题 向学生表ST中增加一个新列:出生日期(RQ),其类型为日期型。实现该功能的正确的SQL语句是______。A.APPEND TABLE RQ DATE ADD STB.APPEND TABLE RQ DATE ADD ST NOT NULLC.ALTER TABLE ST ADD RQ DATE SMALLINTD.ALTER TABLE ST ADD RQ DATE

考题 “把查询sc表和更新sc表的grade列的权限受予用户userl”的正确SQL语句是( )。A)GRANT SELECT,UP DATE(grade)ON TABLE sc TO userlB)GRANT SELECT sc,UP DATE sc,grade TO userlC)GRANT SELECT,UP DATE ON TABLE sc,grade TO userlD)GRANT SELECT ON ABLE sc,UP DATE ON TABLE sc(grade) TO userl

考题 “把查询sc表和更新sc表的grade列的权限授予用户user”的正确SQL语句是( )。A)GRANT SELECT sc,UP DATE sc.Grade TO userB)GRANT SELECT,UP DATE (grade) ON TABLE sc TO userC)GRANT SELECT,UP DATE ON TABLE sc.Grade TO userD)GRANT SELECT ON TABLE sc,UP DATE ON TABLE sc(grade) TO user

考题 数据库中的中的PROFITS表中PRODUCT_NAME与SALE_PERIOD列建立主键。下列哪个语句无法定义这个主键?()A、create table profits(product_name varchar2(10),sale_perion varchar2(10),profit number, constraint pk_profits_01 primary key(product_name,sale_period))B、alter table profits add constraint pk_profits_01 primary key(product_name,sale_period)deferrablC、以上两者都是

考题 DEPARTMENT 表包含以下列: DEPT_ID NUMBER, Primary Key DEPT_ABBR VARCHAR2(4) DEPT_NAME VARCHAR2(30) MGR_ID NUMBER EMPLOYEE 表包含以下列: EMPLOYEE_ID NUMBER EMP_LNAME VARCHAR2(25) EMP_FNAME VARCHAR2(25) DEPT_ID NUMBER JOB_ID NUMBER MGR_ID NUMBER SALARY NUMBER(9,2) HIRE_DATE DATE 请评估以下语句: ALTER TABLE employee ADD CONSTRAINT REFERENTIAL (mgr_id) TO department(mgr_id); 是以下哪个说法()A、ALTER TABLE语句创建从EMPLOYEE表到DEPARTMENT表的引用约束条件B、ALTER TABLE语句创建从DEPARTMENT表到EMPLOYEE表的引用约束条件C、ADD CONSTRAINT子句存在语法错误,因此ALTER TABLE语句将会失败D、ALTER TABLE语句执行成功,但不重新创建引用约束条件

考题 修改表结构,下面哪一语句是正确的()A、ALTER TABLE cw km ADD istagB、ALTER TABLE cw km (ADD istag char(1))C、ALTER TABLE cw km ADD istag char(1)D、ALTER cw km ADD istag char(1)

考题 如下能正确执行的语句是()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

考题 针对Set s接口,下列哪项是正确的?() A、 s.add(2)B、 s.add(new Integer(2))C、 s.add(“2”)D、 s.add(new java.util.Date())

考题 You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()A、 Create an INSERT trigger to assign the default value to each item in the table. B、 Create a CHECK constraint to validate the data and to assign the default value to each item in the table. C、 Create an UPDATE trigger to update the default value for each new item in the table. D、 Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.

考题 单选题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_sexC ALTER TABLE test ALTER t_sex CHAR(2)D ALTER TABLE test DROP(t_sex CHAR(2))

考题 单选题设有表T,现要在该表新增加一个列,列名为:c1,类型为int。下列能实现该功能的语句是()。A ALTER TABLE T ADD COLUMN c1 intB ALTER TABLE T ADD (c1 int)C ALTER TABLE T ADD COLUMN c1D ALTER TABLE T ADD c1

考题 单选题您的主管让您修改ORDERS表中的AMOUNT列。他要求将该列配置为接受默认值250。该表包含您需要保留的数据。应执行以下哪条语句来完成此任务()A ALTER TABLE orders CHANGE DATATYPE amount TO DEFAULT 250B ALTER TABLE orders MODIFY(amount DEFAULT 250)C DROP TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)D DELETE TABLE orders CREATE TABLE orders(orderno varchar2(5)CONSTRAINT pk_orders_01 PRIMARY KEY,customerid varchar2(5)REFERENCES customers(customerid),orderdate date,amount DEFAULT 250)

考题 单选题已知PROJECT(J#,JNAME,DATE),要求若没有视图或约束引用属性DATE,则删除该列,若有视图或约束引用该属性,则不删除该列。则可实现上述语义的语句是()A DELETE TABLE PROJECT DROP DATE CASCADEB DELETE TABLE PROJECT DROP DATE RESTRICTC ATLET TABLE PROJECT DROP DATE CASCADED ATLET TABLE PROJECT DROP DATE RESTRICT

考题 单选题Which statement accomplish this?()A CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);B CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);C CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);D CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);E CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);F CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

考题 单选题The EMPLOYEES table has these columns: LAST NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management 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); What 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 at 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.’

考题 单选题针对Set s接口,下列哪项是正确的?()A  s.add(2)B  s.add(new Integer(2))C  s.add(“2”)D  s.add(new java.util.Date())

考题 单选题You need to create a table named ORDERS that contains four columns: 1.an ORDER_ID column of number data type 2.a CUSTOMER_ID column of number data type 3.an ORDER_STATUS column that contains a character data type 4.a DATE_ORDERED column to contain the date the order was placed When a row is inserted into the table, if no value is provided for the status of the order, the value PENDING should be used instead. Which statement accomplishes this?()A CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );B CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );C CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );D CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );E CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );F CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );

考题 单选题You need to create a table named ORDERS that contain four columns: 1. an ORDER_ID column of number data type 2. aCUSTOMER_ID column of number data type 3. an ORDER_STATUS column that contains a character data type 4. aDATE_ORDERED column to contain the date the order was placed. When a row is inserted into the table, if no value is provided when the order was placed, today's date should be used instead. Which statement accomplishes this?()A CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);B CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);C CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);D CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);E CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);F CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

考题 单选题使用下列SQL语句创建教师表:CREATE TABLE教师表(教师编号I PRIMARY KEY,姓名C(8)NOT NULL,职称C(10)DEFAULT’讲师’)如果要删除“职称”字段的DEFAULT约束,正确的SQL语句是(  )。A ALTER TABLE教师表ALTER职称DROP DEFAULTB ALTER TABLE教师表ALTER职称DELETE DEFAULTC ALTER TABLE教师表DROP职称DEFAULTD ALTER TABLE教师表DROP职称