单选题向student表插入一条新记录的正确SQL语句是(  )。AAPPEND INTO student VALUES('0401','王芳','女',18)BAPPEND student VALUES('0401','王芳','女',18)CINSERT INTO student VALUES('0401','王芳','女',18)DINSERT student VALUES('0401','王芳','女',18)

单选题
向student表插入一条新记录的正确SQL语句是(  )。
A

APPEND INTO student VALUES('0401','王芳','女',18)

B

APPEND student VALUES('0401','王芳','女',18)

C

INSERT INTO student VALUES('0401','王芳','女',18)

D

INSERT student VALUES('0401','王芳','女',18)


参考解析

解析:
SQL插入命令的格式有两种:第一种是标准格式,为INSERT INTO dbf name[(fname1 [,fname2,…])]VALUES(eExpression1[,eExpression2,…]);第二种是Visual FoxPro格式,为INSERT INTO dbf name FORM ARRAY ArrayName/FROM MEMVAR。

相关考题:

使用SQL语句向学生表S(SNO,SN,AGE,SEX)中添加一条新记录,字段学号(SNO)、姓名(SN)、性别(SEX)、年龄(AGE)的值分别为0401、王芳、女、18,正确命令是( )。A.APPEND INTO S (SNO,SN,SEX,AGE) VALUES (’0401’,’王芳’,’女’,18)B.APPEND S VALUES (’0401’,’王芳’ ,18,’女’)C.INSERT INTO S (SNO,SN,SEX,AGE) VALUES (’0401’,’王芳’,’女’,18)D.INSERT S VALUES (’0401’,’王芳’,18,’女’)

向学生表插入一条记录的正确命令是A)APPEND INTO学生VALUES("10359999",‘张三’,‘男’,‘会计’,{^1983-10-28})B)INSERT INTO学生VALUES("10359999",‘张三’,‘男’,{^1983-10-28},‘会计’)C)APPEND INTO学生VALUES("10359999",‘张三’,‘男’,{^1983-10-28},‘会计’)D)INSERT INTO学生VALUES("10359999",‘张三’,‘男’,{^1983-10-28})

使用SQL语句从表STUDENT中查询所有姓王的同学的信息,正确的命令是:A)SELECT*FROM STUDENT WHERE LEFT(姓名,2)=“王”B)SELECT*FROM STUDENT WHERE RIGHT(姓名,2)=“王”C)SELECT*FROM STUDENT WHERE TRIM(姓名,2)=“王”D)SELECT*FROM STUDENT WHERE STR(姓名,2)=“王”

向职工表中插入一条记录的正确语句是( )。A.APPEND BLANK职工VALUES("33","3305","李运来","2700.00")B.APPEND INTO职工VALUES("33","3305","李运来",2700.00)C.INSERT INTO职工VALUES("33","3305","李运来","2700.00")D.INSER INTO职工VALUES("33","3305","李运来",2700.00)

若给出关系Student(S_no,Shame,Sage,S_sex,SD_name,S_add,S_tel),并用SQL语言定义Student关系如下:CREATE Student(S_no CHAR(6), Sname CHAR(30)NOT NULL, Sage CHAR(30), S_sex CHAR(1), SD_name CHAR(20), S_add CHAR(30), S_tel CHAR(20), PRIMARY KEY(S_no));采用(41)向Student中插入记录能被正确地执行。A.INSERT INTO Smdent(S_no,Sname,Sage,S_sex,SD_name,S_add,S_tel)VALUES('010456','黎敏','18',",",",")B.INSERT INTO Student(S_no,Sname,Sage,S_sex,S_r)name,S_add,S_tel)VALUES('010456','黎敏','18','男','计算机学院','北京','88661200')C.INSERT INTO Student(S_no,Sname,Sage,S_sex,SD_name,S_add,S_tel)VALUES(,'黎敏','18','F','计算机学院','北京','88661200')D.INSERT INTO Student(S_no,Sname,Sage,S_sex,SD_name,S_add,S_tel)VALUES('010456',,'18','F','计算机学院','北京','88661200')

向信息系学生视图IS_ STUDENT中插入一个新的学生记录,其中,学号01028,姓名为小红,年龄为18岁,正确的SQL语句是( )。A.INSERT INTO IS_ STUDENT VALUES('01029','小红',18)B.INSERT INTO IS_ STUDENT VALUES(01029,'小红',18)C.SELECT INTO IS_ STUDENT VALUES(01029,小红,18)D.SELECT INTO IS_ STUDENT VALUES('01029','小红',18)

根据SQL标准,增加一条记录到表student,学号sno是11301,姓名sname是“snoopy”,年龄age是20。其中student表中包括学号、姓名、年龄、籍贯、系别等属性,并且属性除sno外皆可取空值。下面哪条是参考的?()A insert into student values(sno=11301, sname=’snoopy’, age =20)B insert into student(sno,sname,age) values(11301,’snoopy’,20)C insert into student set sno=11301, sname=’snoopy’, age = 20D insert into student values (11301, ’snoopy’, 20)

向职工表中插入一条记录,正确的命令是有职工表如下:职工表(部门号N(4)、职工号C(4)、姓名C(8)、工资N(7,2))A.APPEND BLANK 职工表 VALUES("1111","1101","王明","1500.00")B.APPEND INTO 职工表 VALUES("1111","1101","王明",1500.00)C.INSERT INTO 职工表 VALUES("1111","1101","王明","1500.00")D.INSERT INTO 职工表 VALUES("1111","1101","王明",1500.00)

向职工表中插入一条记录,正确的命令是( )。A.APPEND BLANK 职工 VALUES("33","3305","李运来","2700.00")B.APPEND INTO 职工 VALUES("33","3305","李运来",2700.00)C.INSERT INTO 职工 VALUES("33","3305","李运来","2700.00")D.INSERT INTO 职工 VALUES("33",”3305","李运来",2700.00)

向学生表插入一条记录的正确命令是( )。A.APPEND INTO学生VALUES("10359999",'张三','男','会计',{^1983-10-28})B.INSERT INTO学生VALUES("10359999",'张三','男',{^1983-10-28),'会计')C.APPEND INTO学生VALUES("10359999",'张三','男',{^1983-10-28},'会计')D.INSERT INTO学生VALUES("10359999",'张三','男',{^1983-10-28})

如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT(SNO C(4) PRIMARY KEY NOT NULL,;SN C(8),;SEX C(2),;AGE N(2) CHECK(AGE>15 AND AGE<30))下面的SQL语句中可以正确执行的是A.INSERT INTO STUDENT(SNO,SEX,AGE)VALUES (“S9”,“男”,17)B.INSERT INTO STUDENT(SN,SEX,AGE)VALUES (“李安琦”,“男”,20)C.INSERT INTO STUDENT(SEX,AGE)VALUES (“男”,20)D.INSERT INTO STUDENT(SNO,SN)VALUES (“S9”,“安琦”,16)

oracle关联查询题目1数据库中有3 个表 teacher 表,student 表,tea_stu 关系表。teacher 表 teaID name agestudent 表 stuID name ageteacher_student 表 teaID stuID要求用一条sql 查询出这样的结果1.显示的字段要有老师name, age 每个老师所带的学生人数2 只列出老师age 为40 以下学生age 为12 以上的记录预备知识:1.sql 语句是对每一条记录依次处理,条件为真则执行动作(select,insert,delete,update)2.只要是迪卡尔积,就会产生“垃圾”信息,所以,只要迪卡尔积了,我们首先就要想到清除“垃圾”信息实验准备:drop table if exists tea_stu;drop table if exists teacher;drop table if exists student;create table teacher(teaID int primary key,name varchar(50),age int);create table student(stuID int primary key,name varchar(50),age int);create table tea_stu(teaID int references teacher(teaID),stuID int references student(stuID));insert into teacher values(1,'zxx',45), (2,'lhm',25) , (3,'wzg',26) , (4,'tg',27);insert into student values(1,'wy',11), (2,'dh',25) , (3,'ysq',26) , (4,'mxc',27);insert into tea_stu values(1,1), (1,2), (1,3);insert into tea_stu values(2,2), (2,3), (2,4);insert into tea_stu values(3,3), (3,4), (3,1);insert into tea_stu values(4,4), (4,1), (4,2) , (4,3);结果:2_3,3_2,4_3

如果学生表STUDENT是使用下面的SQL语句创建的: CREATE TABLE STUDENT(SNO C(4)PRIMARY KEY NOT NULL. SN C(8), SEX C(2), AGE N(2)CHECK(AGE15 AND AGE25)) 下面的SQL语句中可以正确执行的是( )。A. INSERT INTO STUDENT(SN,SEX,AGE)VALUES(”王磊”,”男”,20)B. INSERT INTO STUDENT(SN0,SEX,AGE)VALUES(”S9”,”男”,17)C. INSERT INTO STUDENT(SEX,AGE)VALUES(”男”,20)D. INSERT INTO STUDENT(SN0,SN,AGE)VALUES(”S9”,”王磊”,14)

如果学生表student是使用下面的SQL谙句创建的: CREATE TABLE student(学号C(6)PRIMARY KEY NOT NULL,姓名C(8),性别C(2),年龄N(2) CHECK(年龄15 AND年龄30,)) 则下面的SQL语句中可以正确执行的是( )。A. INSERT INTO student(学号,性别,年龄)VALUES(”0542”,”李雷”,”男”,17)B. INSERT INTO student(学号,性别,年龄)VALUES(”李雷”,”男”,20)C. INSERT INTO student(学号,性别,年龄)VALUES(”女”,25)D. INSERT INTO student(学号,性别,年龄)VALUES(”0897”,”安宁”,”女”,30)

若给出关系Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel),并用SQL语言定义Student关系如下: CREATE Student(S_no CHAR(6), Sname CHAR(30)NOT NULL, Sage CHAR(30), S_sex CHAR(1), SD_name CHAR(20), S_add CHAR(30), S_tel CHAR(20), PRIMARY KEY(S_no)); 采用(45)向Student中插入记录能被正确地执行。A.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES('010456', '黎敏', '18', ", ", ", ")B.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES('010456', '黎敏', '18', '男', '计算机学院', '北京', '88661200')C.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES(, '黎敏', '18', 'F', '计算机学院', '北京', '88661200')D.INSERT INTO Student(S_no, Sname, Sage, S_sex, SD_name, S_add, S_tel) VALUES('010456', , '18', 'F', '计算机学院', '北京', '88661200')

如果学生表STUDENT是使用下面的SQL语句创建的 CREATE TABLE STUDENT(SNOC(4)PR1MARY KEY NOTNULL; SNC(8),; SEXC(2),; AGEN(2)CHECK(AGE>15AND AGE<30) 下面的SQI语句中可以正确执行的是 ______。A.INSERT INTO STUDENT(SNO,SEX,AGE)valueS("S9","男",17)B.INSERT INTO STUDENT(SNO,SEX,AGE)valueS(“李安琦”,“男”,20)C.INSERT INTO STUDENT(SEX,AGE)valueS(“男”,20)D.INSERT INTO STUDENT(SNO,SN)valueS("S9",“安琦”,16)

使用SQL语句从表STUDENT中查询所有姓王的同学的信息,正确的命令是:______。A.SELECT*FROM STUDENT WHERE LEFT(姓名,2)=“王”B.SELECT*FROM STUDENT WHERE RIGHT(姓名,2)=“王”C.SELECT*FROM STUDENT WHERE TRIM(姓名,2)=“王”D.SELECT*FROM STUDENT WHERE STR(姓名,2)=“王”

向职丁表中插人一条记录的正确语句是( )。A.ApPEND BLANK职工 VALUES(”33”,”3305”, ”李运来”,”2700.00”)B.APPEND IWl、O职工VALUES(”33”,”3305”,”李运 来”92700.OO)C.INSERT INT0职工VALUES(”33…””39113305”,”李 运来””9112700.00”)D.INSERT INT0职工VALUES(”3311”,”13305”,”李运来”,2700.00)

向student表插入一条新记录的正确SQL语句是A.APPEND INTO student VALUES(‘0401’,‘王芳’,‘女’,18)B.APPEND student VALUES(‘0401’,‘王芳’,’女’,18)C.INSERT INTO student VALUES(‘0401’,‘王芳’,‘女’,18)D.INSERT student VALUES(‘0401’,‘王芳’,‘女’,18)

正确的SQL插入命令的语法格式是( )。 A.INSERT IN…VALUES…B.INSERT TO…VALUES… 正确的SQL插入命令的语法格式是( )。A.INSERT IN…VALUES…B.INSERT TO…VALUES…C.INSERT INTO…VALUES…D.INSERT…VALUES…

向职工表中插入一条记录,正确的命令是( )。A.APPEND BLANK 职工表 VALUES("1111","1101","王明","1500.00")B.APPEND INTO 职工表 VALUES("1111","1101","王明",1500.00)C.INSERT INTO 职工表 VALUES("1111","1101","王明","1500.00")D.INSERT INTO 职工表 VALUES("1111","1101","王明",1500.00)

如果学生表student是使用下面的SQL语句创建的CREATE TABLE student(学号C(4)PRIMARY KEY NOT NULL,;姓名C(8),;性别C(2),;年龄N(2)CHECK(年龄1 5 AND年龄30))下面的SQL语句中可以正确执行的是( )。A)INSERT INTO student(学号,性别,年龄)VALUES(”0542”,”男”,l7)B)INSERT INTO student(姓名,性别,年龄VALUES(”李蕾”,”女”,20)C)INSERT INTO student(姓名,性别,年龄)VALUES(”男”,25)D)INSERT INTO student(学号,姓名)VALUES(”0897”,”安宁”,16)

使用连接对象的Execute方法可以执行各种SQL语句,以完成创建数据库、创建表、添加新记录、修改记录及删除记录等任务。试完成填空题。 已知变量tid,tname,tpwd,tage分别表示从表单中接收到的数据,假设已完成数据合法检验。试写出在student表中插入一条新记录的SQL语句。要求将变量替换到SQL语句中。   conn.Execute("Insert  into  student()  values  (’"tid"’,’"tname"’, ’"tpwd"’,"tage")")

数据结构里,struct student { char name[20]; char sex[10]; int age; int score; }; 定义结构体后,定义变量、数组赋值正确的是()。A、struct student s={"张三","男",18,100};B、struct student stu[3]={{"张三","男",18,100},{"李四","男",19,90},{"王五","男",23,97}};C、struct student s={"李四";"女";18;100};D、struct student stu[3]={{"张三",18,"男",100},{"李四",19,"男",90},{"王五",23,"男",97}};

使用SQL语句向学生表S(SNO,SN,AGE,SEX)中添加一条新记录,字段学号(SNO)、姓名(SN)、性别(SEX)、年龄(AGE)的值分别为0401、王芳、女、18,正确的命令是()A、APPEND INTO S (SNO,SN,SXE,AGE) VALUES (’0401’,’王芳’,’女’,18)B、APPEND S VALUES (’0401’,’王芳’,’女’,18)C、INSERT INTO S (SNO,SN,SEX,AGE) VALUES (’0401’,’王芳’,’女’,18)D、INSERT S VALUES (’0401’,’王芳’,18,’女’)

多选题数据结构里,struct student { char name[20]; char sex[10]; int age; int score; }; 定义结构体后,定义变量、数组赋值正确的是()。Astruct student s={张三,男,18,100};Bstruct student stu[3]={{张三,男,18,100},{李四,男,19,90},{王五,男,23,97}};Cstruct student s={李四;女;18;100};Dstruct student stu[3]={{张三,18,男,100},{李四,19,男,90},{王五,23,男,97}};

单选题使用SQL语句向学生表S(SNO,SN,AGE,SEX)中添加一条新记录,字段学号(SNO)、姓名(SN)、性别(SEX)、年龄(AGE)的值分别为0401、王芳、女、18,正确的命令是()AAPPEND INTO S (SNO,SN,SXE,AGE) VALUES (’0401’,’王芳’,’女’,18)BAPPEND S VALUES (’0401’,’王芳’,’女’,18)CINSERT INTO S (SNO,SN,SEX,AGE) VALUES (’0401’,’王芳’,’女’,18)DINSERT S VALUES (’0401’,’王芳’,18,’女’)