SQL更改数据库表创建时间的问题

来源:百度知道 编辑:UC知道 时间:2024/06/06 20:05:08
use database DBName

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
网上搜索到这个方法,但是不知道怎么使用,我是初学者,希望懂的人能帮我解释一下步骤!谢谢!

放到查询分析器里执行

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

可能会碰到一个错误提示:“未启用对系统目录的特殊更新。

打开mssql server 属性---》服务器选项----》启用对系统目录的特殊更新(允许对系统目录进行直接修改) 即可。

直接复制到查询分析器中 然后F5就OK

SQL2000可用更改,SQL2005以上版本不可以更改