所有人都知道select top 的用法
我們看下面的測試代碼
set nocount on
use tempdb
go
if (object_id (
drop table tb
go
create table tb (id int identity (
insert into tb (name ) select
insert into tb (name ) select
insert into tb (name ) select
insert into tb (name ) select
insert into tb (name ) select
/*
id name tag
*/
update top (
select * from tb
/*
id name tag
*/
;with t as
(
select top (
)
update t set tag =
select * from tb
/*
id name tag
*/
delete top (
select * from tb
/*
id name tag
*/
;with t as
(
select top (
)
delete from t
select * from tb
set nocount off
我會在下一篇文章中介紹一個應用
如果你感興趣的話可以自己先思考一下
SQLServer
From:http://tw.wingwit.com/Article/program/MySQL/201311/29576.html