
<SQL>
JsuFcz
这个作者很懒,什么都没留下…
展开
-
SQL操作整理(...)
检测数据库是否存在use mastergoif not exists (select * from sysdatabases where name = test_db) begin create database test_db select * from sysdatabases where name = test_db endelse begin drop database test原创 2008-12-05 17:15:00 · 475 阅读 · 0 评论 -
SQL锁表语句
锁定数据库的一个表 SELECT * FROM table WITH (HOLDLOCK)注意: 锁定数据库的一个表的区别SELECT * FROM table WITH (HOLDLOCK) 其他事务可以读取表,但不能更新删除SELECT * FROM table WITH (TABLOCKX) 其他事务不能读取表,更新和删除SELECT 语句中“加锁选项”的功能说明转载 2008-12-18 11:18:00 · 5398 阅读 · 0 评论