How to get number of rows in a SQL Server 2008 query -


how number of rows sql query?

i tried :

set @records = count(*) select *  [inventory].[tbl_receipts]                  field_tag = '1234' 

but giving 1. wrong above code?

actually there no row, should give output 0

when execute

select *  [inventory].[tbl_receipts]  field_tag = '1234' 

it giving result 0

use

set @records = (select count(*)                   [inventory].[tbl_receipts]                  field_tag = '1234') 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -