建表时,如何设置字段的值,默认等于其他两个字段的和? create table tb(a int,b int,c int ??? ---设置字段C 为a+b的和;) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 declare @ABC table (id int identity(1,1),a int,b int,c as a*b)insert into @ABC(a,b)select 1,1 union allselect 2,3 select * from @ABC CREATE TABLE [dbo].[testadd]( [a] [int] NULL, [b] [int] NULL, [c] AS ([a]+[b])) create table tb(a int,b int,c as a + b) sql语句,帮忙! 如何删除无效的存储过程 怎么从一个纪录里筛选出某一列不重复的纪录? 请问个问题,在线等待 简单的存储过程,但是总是出错。请高手了。 SQL批量update,insert优化 邹大版救命啊!MSsql连接问题... 问一个超简单的问题 请问,如何连接SQL server数据库?谢谢! 如何用distinct对两列进行消除重复行的操作 关于库存表的设计 一条简单的触发器?
insert into @ABC(a,b)
select 1,1 union all
select 2,3
select * from @ABC
[a] [int] NULL,
[b] [int] NULL,
[c] AS ([a]+[b])
)
create table tb(
a int,
b int,
c as a + b
)