Home > Database > Mysql Tutorial > body text

sql语句操作

WBOY
Release: 2016-06-07 14:57:51
Original
979 people have browsed it

SQLSERVER-2008实现表的‘备份’相关语句。复制表的结构,实现数据的迁移等 无 SQLSERVER-2008实现表的‘备份’相关语句--实现表的重新命名exec sp_rename '原表名' , '新表名' ;--实现只是复制表的结构select * into '新表名' from '原表名' where 1 = 2 ;--

SQLSERVER-2008实现表的‘备份’相关语句。复制表的结构,实现数据的迁移等
SQLSERVER-2008实现表的‘备份’相关语句

--实现表的重新命名
exec  sp_rename  '原表名' , '新表名' ;
--实现只是复制表的结构
select * into '新表名' from '原表名' where 1 = 2 ;
--复制表的结构,并实现表中的数据的迁移
select * into '新表名' from '原表名'  ;
--设置数据库的主键增长的起始数值
DBCC CHECKIDENT ('数据库表名', RESEED,'主键起始值') 
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template