sql添加记录语句

来源:百度知道 编辑:UC知道 时间:2024/05/22 12:10:09
请自己数据写出一条添加记录的SQL语句。

不需要很复杂的,把insert into 表名 (字段1,字段2) values (字符串1,字符串2) where 条件 套进去就可以了。

在线等。
只是回答一个简答题
写让自拟数据实现添加记录功能SQL的语句。
说的够不够明白?
因为题目就是这么问的。。。

不明白你想问什么??

补充:
自己先创建一个表
create table stu
{
stuId int identity(1,1) print mary,
stuName varchar(10),
stuAge varchar(10),
stuSex varchar(5)
}

插入数据
insert into stu(stuName,stuAge,stuSex) values('张三','20','男')

查询
select * from stu where stuName = '张三'
需要模糊查询的话
select * from stu where stuName like '张三'

修改
update stu set stuAge = '18' where stuName = '张三'

如果你是想用一张新表表更新旧表:
merge into 要合并的表
using 用那个表更新或插入它 on (它的条件是什么)
when matched then
update
set
更新哪一行
when notmat ched
insert
(插入那一列)
values
(新值)
如果我理解错误了,只能说明出题的人太BT了

添加记录?
那得选定条件,用SQL打开数据库后,判断条件用rs.addnew和rs.update更新添加记录!
如果你能详细跟我说的话.我或许可以帮你写下.

insert into students (stuno,name,math,english,physics) values('S004','芳芳',99,99,99)