Given the following two tables: TAB1 C1 C2 1 Antarctica 2 Af

题目
单选题
Given the following two tables: TAB1 C1 C2 1 Antarctica 2 Africa 3 Asia 4 Australia TAB2 CX CY 5 Europe 6 North America 7 South America Which of the following SQL statements will insert all rows found in table TAB2 into table TAB1?()
A

INSERT INTO tab1 SELECT cx, cy FROM tab2

B

INSERT INTO tab1 VALUES (tab2.cx, tab2.cy)

C

INSERT INTO tab1 VALUES (SELECT cx, cy FROM tab2)

D

INSERT INTO tab1 (c1, c2) VALUES (SELECT cx, cy FROM tab2)

参考答案和解析
正确答案: B
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given that tables T1 and T2 contain the following rows:Table T1: C1 C2 1 4 1 3 1 2Table T2: C1 C2 1 1 1 2 1 3Which of the following queries will return only those rows that exist in both T1 and T2?()

A.SELECT * FROM t1 UNION SELECT * FROM t2

B.SELECT * FROM t1 UNION DISTINCT SELECT * FROM t2

C.SELECT * FROM t1 INTERSECT SELECT * FROM t2

D.SELECT * FROM t1 WHERE (c1,c2)= (SELECT c1,c2 FROM t2)


参考答案:C

第2题:

Given the following tables: CONTINENTS ID NAME COUNTRIES1 Antarctica 02 Africa 533 Asia 474 Australia 145 Europe 436 North America 237 South America 12REGION ID LOCATION 1 East 2 WestHow many rows would be returned using the following statement? SELECT location FROM continents, region()

A.2

B.7

C.9

D.14


参考答案:D

第3题:

以下程序运行后的输出结果是______。 main() { char c1,c2; for(c1='0',c2='9';c1<c2;c1++,c2--) printf("%c%c",c1,c2); printf("\n"); }

A.918245765

B.893478654

C.786584763

D.918273645


正确答案:D

第4题:

有以下程序 #include main() { char c1=’1’,c2=’2’; c1=getchar(); c2=getchar(); putchar(c1); putchar(c2); } 当运行时输入:a<回车>后,以下叙述正确的是()

  • A、变量C1被赋予字符a,c2被赋予回车符
  • B、程序将等待用户输入第2个字符
  • C、变量c1被赋予字符a,c2中仍是原有字符2
  • D、变量c1被赋予字符a,c2中将无确定值

正确答案:A

第5题:

有以下程序:include main( ) {char c1='1',c2='2';c1=getchar();c2=getchar();putcha

有以下程序:#include <stdio, h>main( ) { char c1='1',c2='2'; c1=getchar();c2=getchar();putchar(c1);putchar(c2); } 当运行时输入:a<回车>后,以下叙述正确的是( )。

A.变量c1被赋予字符a,c2被赋予回车符

B.程序将等待用户输入第二个字符

C.变量c1被赋予字符a,c2中仍是原有字符2

D.变量c1被赋予字符a,c2中将无确定值


正确答案:A
解析:函数getchar()的作用是从终端(或系统隐含指定的输入设备)输入一个字符,且只能接受一个字符(回车符也是一个字符)。故本题中变量c1被赋予字符a,c2被赋予回车符。

第6题:

Given the following statements:CREATE TABLE tab1 (col1 INT); CREATE TABLE tab2 (col1 INT); CREATE TRIGGER trig1 AFTER UPDATE ON tab1 REFERENCING NEW AS new1 FOR EACH ROW MODE DB2SQL INSERT INTO tab2 VALUES(new1.col1); INSERT INTO tab1 VALUES(2),(3);What is the result of the following query? SELECT count(*) FROM tab2;()

A.3

B.2

C.1

D.0


参考答案:D

第7题:

有以下程序includemain(){charc1='1',c2='2';c1=getchar();c2=getchar();putchar(c1)

有以下程序#include<stdio. h>main(){ char c1='1',c2='2'; c1=getchar(); c2=getchar(); putchar(c1); putchar(c2);} 当运行时输入:a<回车> 后,以下叙述正确的是

A.变量c1被赋予字符a,c2被赋予回车符

B.程序将等待用户输入第2个字符

C.变量c1被赋予字符a,c2中仍是原有字符2

D.变量c1被赋予字符a,c2中将无确定值


正确答案:A
解析:本题考查的是getchar()函数。getchar()函数执行时将从键盘缓冲区中读取用户的输入,而不管输入的是否可打印字符,所以当输入a<回车>后,键盘缓冲区被输入的实际上是两个字符:'a'和'\n'。故选项A的说法是正确的。

第8题:

有以下程序: includemain(){char c1='1',c2='2';c1=getchar();c2=getchar();putchar(c

有以下程序: # include<stdio.h> main() {char c1='1',c2='2'; c1=getchar();c2=getchar();putchar(c1);putchar (c2); } 当运行时输入:a<回车>后,以下叙述正确的是 ______。

A.变量c1被赋予字符a,c2被赋予回车符

B.程序将等待用户输入2个字符

C.变量c1被赋予字符a,c2中仍是原有字符2

D.变量c1被赋予字符a,c2中将无确定值


正确答案:A
解析:getchar函数读入字符时,空格、回车符都作为字符读入,因此A正确。

第9题:

电容器C1、C2并联后,其总电容为()

  • A、C1与C2之和
  • B、C1与C2之差
  • C、C1与C2之积
  • D、C1与C2之比

正确答案:A

第10题:

Table TAB1 was created using the following statement: CREATE TABLE tab1 (c1 INT, c2 INT, c3 INT, c4 INT, c5 INT); If column C1 is unique and queries typically access columns C1 and C2 together, which statement(s) will create index(es) that will provide optimal query performance? ()

  • A、 CREATE UNIQUE INDEX xtab1 ON tab1 (c1) include (c2)
  • B、 CREATE UNIQUE INDEX xtab1 ON tab1 (c1);  CREATE INDEX xtab2 ON tab1 (c3) INCLUDE (c2) 
  • C、 CREATE UNIQUE INDEX xtab1 ON tab1 (c2, c1)
  • D、 CREATE UNIQUE INDEX xtab1 ON tab1 (c2) INCLUDE (c1)

正确答案:A

更多相关问题