[转帖]在sybase中使选出的结果前添加一个行标识
select id0=identity(10),* into #temp from tablename 好东东,简单有效 <p>我昨天发了几个东东,能加个精不</p> 加了一个,不过以后希望多发原创的啊,呵呵! <p> OK. 有好东东会拿出来跟大家分享地~~~</p> <p>select id0=identity(10),* from tablename 却不行:</p><p>The IDENTITY function should be used only when the SELECT statement has an INTO clause. <br/></p> <p>要加上 into #temp 啊,不加当然执行不掉啦。插入temp后再select * from #temp就ok了</p>
页:
[1]