随笔分类 -  Sql Server

摘要:select top 10 * from table where id not in( select top 10 id from table order by id desc) order by id descselect top 10 * from(select Top 20 * from table_A order by id desc)更新数据时维护一个连续编号字段select * fro... 阅读全文

posted @ 2006-07-11 13:24 fgp3 阅读(192) 评论(0) 推荐(0) |

摘要:uniqueidentifier是全局唯一标识符 (GUID)NEWID()返回类型为uniqueidentifierSQL SERVER联机帮助中的例子:declare @myid uniqueidentifierset @myid=newid()print 'Value of @myid is '+cast(@myid as varchar(255))每次运行以上程序返回不同的uniqueid... 阅读全文

posted @ 2006-07-05 08:23 fgp3 阅读(332) 评论(0) 推荐(0) |

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3