declare @nRow int set @nRow = 4 select top (@nRow) * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701'
lare @nRow int set @nRow = 4 exec('select top '+@nRow+' * from MD_CountyUnit where ID_County = ''410102'' and ID_Dept = ''AH1701''')
declare @nRow int set rowcount @nRow select * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701' set rowcount 0
漏了一行 declare @nRow int set @nRow = 4 set rowcount @nRow select * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701' set rowcount 0
lare @nRow int set @nRow = 4 exec('select top '+@nRow+' * from MD_CountyUnit where ID_County = ''410102'' and ID_Dept =''AH1701''')
--2005以上 declare @nRow int set @nRow = 4 select top (@nRow) * FROM sys.tables go--2000以上 declare @nRow int set @nRow = 4 exec('select top '+@nRow+' * from MD_CountyUnit where ID_County = ''410102'' and ID_Dept = ''AH1701''') go --2000以上 declare @nRow int set @nRow = 4 set rowcount @nRow select * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701' set rowcount 0
set @nRow = 4
select top (@nRow) * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701'
set @nRow = 4
exec('select top '+@nRow+' * from MD_CountyUnit where ID_County = ''410102'' and ID_Dept = ''AH1701''')
declare @nRow int
set rowcount @nRow
select * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701'
set rowcount 0
declare @nRow int
set @nRow = 4
set rowcount @nRow
select * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701'
set rowcount 0
lare @nRow int
set @nRow = 4
exec('select top '+@nRow+' * from MD_CountyUnit where ID_County = ''410102'' and ID_Dept =''AH1701''')
--2005以上
declare @nRow int
set @nRow = 4
select top (@nRow) * FROM sys.tables
go--2000以上
declare @nRow int
set @nRow = 4
exec('select top '+@nRow+' * from MD_CountyUnit where ID_County = ''410102'' and ID_Dept = ''AH1701''')
go
--2000以上
declare @nRow int
set @nRow = 4
set rowcount @nRow
select * from MD_CountyUnit where ID_County = '410102' and ID_Dept = 'AH1701'
set rowcount 0