select col1,col2,col3 from T1 into T2(col1,col2,col3)
insert T1 (col1,col,col3) into T2(col1,col2,col3)
insert into T2 (col1,col2,col3) as select col1,col2,col3 from T1
insert into T2(col1,col2,col3) select col1,col2,col3 from T1;
第1题:
A.Theoperationcol1.retainAll(col2)willnotmodifythecol1object.
B.Theoperationcol1.removeAll(col2)willnotmodifythecol2object.
C.Theoperationcol1.addAll(col2)willreturnanewcollectionobject,containingelementsfrombothcol1 andcol2.
D.Theoperationcol1.containsAll(Col2)willnotmodifythecol1object.
第2题:
用sql语句取出两个表相同列名的数据组成一个表。
第3题:
在“住宿管理”数据库中有“学生”表和“宿舍”表。用SQL语句完成查询,结果为学生姓名及所住的宿舍电话号码,并将结果存放于表。result中,将SQL语句保存在result.prg文件中。
第4题:
客服业务受到SQL语句的影响非常大,以下哪些是执行效率比较低的SQL语句,可以进行优化()
第5题:
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
第6题:
数据库中有Tahie_priceHistory表,结构如下表所示:
[*]
①写出创建Teachers表的SQL语句,要求语句中包含所有的约束。
②现要查询单价最高的前三种商品的商品编号、商品名称和单价(使用TOP语句)。
第7题:
Given the following DDL and INSERT statements:CREATE VIEW v1 AS SELECT col1 FROM t1 WHERE col1 > 10; CREATE VIEW v2 AS SELECT col1 FROM v1 WITH CASCADED CHECK OPTION; CREATE VIEW v3 AS SELECT col1 FROM v2 WHERE col1 < 100; INSERT INTO v1 VALUES(5); INSERT INTO v2 VALUES(5); INSERT INTO v3 VALUES(20); INSERT INTO v3 VALUES(100);How many of these INSERT statements will be successful?()
A.0
B.1
C.2
D.3
第8题:
A.更新DB1数据库中表Table1的所有统计信息
B.在DB1数据库中,使用CREATESTATISTICS语句为表Table1的列col3创建缺少的统计信息
C.设置优先值提升选项的值为1
D.执行如下语句:USEDB1GOCREATEINDEXindex1ONtable1(col3)INCLUDE(col1,col2)WITH(ONLINE=ON)GO
E.执行如下语句USEDB1GOCREATEINDEXindex1ONtable1(col3,col2,col1)
第9题:
YouworkwithadatabasenamedDB1,whichislocatedonaSQLServer2005computer.YoudiscoverthatatablescanonTable1inDB1causesaslowquery.Table1isaverylargetablethatisusedfrequently.Youascertainthatthequerycontainsthefollowingstatement.SELECTcol1,col2FROMtable1WHEREcol3=Youneedtoprovidemaximumqueryperformance.Table1mustremainavailabletousers.Whatshouldyoudo?()
A.UpdateallstatisticsonTable1inDB1.
B.UsetheCREATESTATISTICSstatementinDB1tocreatemissingstatisticsoncol3ofTable1.
C.Setthepriorityboostserveroptionto1.
D.Executethefollowingstatement.USEDB1GOCREATEINDEXindex1ONtable1(col3)INCLUDE(col1,col2)WITH(ONLINE=ON)GO
第10题:
If a unique constraint is defined on column COL1 of table TAB1, what are the characteristics of COL1?()