在数据库中,删除数据表student的命令是什么? (1.0分) [单选.] A. delete table student B. delete student C. drop student D. drop table student

题目
在数据库中,删除数据表student的命令是什么? (1.0分) [单选.] A. delete table student B. delete student C. drop student D. drop table student
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

从student表删除年龄大于30的记录的正确SQL命令是( )。

A.DELETE FOR年龄>30

B.DELETE FROM student WHERE年龄>30

C.DELETE student FOR年龄>30

D.DELETE student WHERE年龄>30


正确答案:B
在表中删除记录的SQL语句格式为:de—letefromtablename[wherecondition],故答案为B。

第2题:

You need to design a student registration database that contains several tables storing academic information.The STUDENTS table stores information about a student. The STUDENT_GRADES table storesinformation about the student‘s grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key.You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table thatpoints to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()

A. CREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY student (student_id));

B. CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));

C. CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES student (student_id));

D. CREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id));


参考答案:D

第3题:

删除视图STUDENT的命令是( )。

A.DELETE STUDENT VIEW

B.DELETE STUDETN

C.DROP STUDENT VIEW

D.DROP VIEW STUDENT


正确答案:D
解析:视图由于是从表中派生出来的,所以不存在修改结构的问题,但视图可以被删除。删除视图的命令格式是:DROP VIEW 视图名>。

第4题:

Examine the statement:GRANT select, insert, updateON student_gradesTO managerWITH GRANT OPTION;Which two are true?()

A. MANAGER must be a role.

B. It allows the MANAGER to pass the specified privileges on to other users.

C. It allows the MANAGER to create tables that refer to the STUDENT_GRADES table.

D. It allows the MANAGER to apply all DML statements on the STUDENT_GRADES table.

E. It allows the MANAGER the ability to select from, insert into, and update the STUDENT_GRADES table.

F. It allows the MANAGER the ability to select from, delete from, and update the STUDENT_GRADES table.


参考答案:B, E

第5题:

根据SQL标准,要删除表student中所有数据,但不将表student的定义一起删除,下面哪个语句可以适用?()

A delete from student

B delete all from student

C delete * from student

D drop table student


参考答案A

第6题:

由于学号(SN)为00291的学生已毕业,欲在关系“Student”中删除该学生的所有信息,用元组关系演算语言实现应为(53)。

A.GET W(Student): Student. SN = 00291' DELETE W

B.GET W: Student. SN = 00291'in Student DELETE W

C.HOLD W(student): Student. SN = 00291' DELETE W

D.HOLD W: Student. SN = 00291'in Student DELETE W


正确答案:C
解析:欲删除某信息,应先使用HOLD读取信息,而非GET。

第7题:

根据SQL标准,删除表student中对字段sno的唯一性约束,应该使用下面哪条语句? ()

A drop sno from table student

B alter table student drop sno

C alter table student drop unique(sno)

D alter table student drop sno unique


参考答案C

第8题:

如果要删除Student数据库中的Information表,可以使用下列哪个命令?一——

A.ALTER TABLE Information

B.TRUNCATE TABLE Information

C.DROP。TABLE Information

D.DELETE TABLE Information


正确答案:C
解析:删除表的语言格式为:DROP TABLE<表名>I{[,<表名>]…l}。

第9题:

Which statement explicitly names a constraint? ()

A. ALTER TABLE student_grades ADD FOREIGN KEY (student_id) REFERENCES students (student_id);

B. ALTER TABLE student_grades ADD CONSTRAINT NAME = student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

C. ALTER TABLE student_grades ADD CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

D. ALTER TABLE student grades ADD NAMED CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);

E. ALTER TABLE student grades ADD NAME student_id_fk FOREIGN KEY (student_id) REFERENCES students (student_id);


参考答案:C

第10题:

删除视图STUDENT的命令是( )。

A.DELETE STUDENTVIEW

B.DELETE STUDETN

C.DROP STUDENTVIEW

D.DROPVIEW STUDENT


正确答案:D
解析:视图由于是从表中派生出来的,所以不存在修改结构的问题,但视图可以被删除。删除视图的命令格式是:DROP VIEW视图名>。

更多相关问题