读书人

默认值设置,该怎么解决

发布时间: 2012-01-14 20:02:35 作者: rapoo

默认值设置
默认值等于另外一个字段的值
id chart
title chart
title 默认值设置:(title= 'sys '+id )
请问该怎么处理.
知道触发器可以解决.打开设计表里面怎么写?可以实现吗?


[解决办法]
create table temp(id char(10),title as 'sys '+id)

insert into temp(id) values( '1111 ')
select * from temp
[解决办法]
--用SQL Server提供的公式字段,如:

create table temp(id char(10),title as 'sys '+id)

读书人网 >SQL Server

热点推荐