如何向表A(ID,credit)添加一个新数据,使credit的值是前两个数据值的和,然后显示所有的数据
来源:百度知道 编辑:UC知道 时间:2024/05/24 02:56:56
ID credit
1 1
2 2
3 3
4 5
6 8
显示应结果为:
1 1
2 2
3 3
4 5
6 8
7 13
如何用SQL语句来实现?
1 1
2 2
3 3
4 5
6 8
显示应结果为:
1 1
2 2
3 3
4 5
6 8
7 13
如何用SQL语句来实现?
ID是自动编号:
declare @a int,@b int
--获得编号最大的值
select @a=credit from A where id in (select max(id) from A)
--获得编号第二大的值
select @b=credit from A where id < (select max(id) from A)
insert into A values(@a+@b)
不是自动编号的很简单,省略
如何向表A(ID,credit)添加一个新数据,使credit的值是前两个数据值的和,然后显示所有的数据
如何通过Credit Card向境外汇款
如何翻译?We request a 30% credit on the cost of these two 2 seaters.
如何刷credit卡积分
call it a credit card什么意思?
请问如何翻译 green credit policy
如何接收Credit Card境外汇款
请问A letter of credit在商务英语中是什么意思?
pls send me a credit note for bad quality good
在eMule v0.47a中如何判断自己是HIGH ID还是LOW ID?