事务备份还原分离附加

遗留问题: 1、如何查询值为null的数据行: select *from 表 where 列 is null 2、nvarchar(max)长度,是不允许作为主键列的 3、自增列: create table 表名 ( ids int primary identity(1,1) ) ---------------------------------------------------------- 事务: 保障流程的完整执行 格式: select * from 表 begin tran insert into 表 values(值) insert into 表 values(值) if @@error >0 begin rollback tran --回滚事务 end eles begin commit tran--提交事务 end ---------------------------------------------------------- 备份,还原: 不用将数据库的服务关闭,就可以直接备份 分离,附加:
posted @ 2016-06-14 19:04  宋小尧  阅读(124)  评论(0编辑  收藏  举报