位置:首頁 > 軟件操作教程 > 數(shù)據(jù)分析 > SQL > 問題詳情

SQL操作應用——:select top 30 recid from A where recid>-1

提問人:ylm發(fā)布時間:2020-09-30

在那個子查詢中也加條件:select top 30 recid from A where recid>-1

例2:查詢表中的最后以條記錄,并不知道這個表共有多少數(shù)據(jù),以及表結(jié)構。
set @s = 'select top 1 * from T   where pid not in (select top ' + str(@count-1) + ' pid  from  T)'

print @s      exec  sp_executesql  @s

繼續(xù)查找其他問題的答案?

相關視頻回答
回復(0)
X
返回頂部
付费复制

付费获取七天复制权限

限时特价:2.88元/篇原价:10元
联系客服

扫码关注公众号,发送私信联系客服.

微信扫码关注,联系客服

联系客服QQ:2845411722

恭喜您,操作成功,可以复制了

3秒后关闭
X