sql server2005数据库,表的创建时间可以修改吗?怎么修改?知道的,告诉在下啊,满意答案,10分奖励

如题所述

第1个回答  2011-05-05
用UPDATE 来修改吧,如果时间设置了unique的话就不能修改了
第2个回答  2011-05-05
通过 执行以下SQL语句能够将数据库创建时间进行修改

use 数据库名

sp_configure 'allow updates',1
reconfigure with override
go
update sysobjects set crdate='2007-05-30' where id=object_id('表名')
go
sp_configure 'allow updates',0
reconfigure with override

可能会碰到一个错误提示:“未启用对系统目录的特殊更新。系统管理员必须重新配置 SQL Server 以允许这种操作。”

解决这个小小的问题的方法是:打开mssql server 属性---》服务器选项----》启用对系统目录的特殊更新(允许对系统目录进行直接修改) 即可。(ps:企业管理器---》工具---》SQL Server 配置属性---》服务器设置---》允许对系统目录直接进行修改)之后重新在查询分析器中执行刚才的sql语句即可本回答被网友采纳
第3个回答  2011-05-05
可以的
use 数据库名

sp_configure 'allow updates',1
reconfigure with override
go
update sysobjects set crdate='2007-05-30' where id=object_id('表名')
go
sp_configure 'allow updates',0
reconfigure with override
相似回答