把某個字段從新生氣序列(從1到n):

DECLARE @i int Set @i = 0 Update Table1 Set @i = @i + 1,Field1 = @i數據庫 2.按成績排名次 Update 成績表 Set a.名次 = ( Select Count(*) + 1 From 成績表 b Where a.總成績 < b.總成績 ) From 成績表 a排序 3.查詢外部數據庫 Select a.* From Open
相關文章
相關標籤/搜索