tôi muốn có được giá trị từ Exec(@sql)
và gán cho @Rowcount(int)
giá trị Return từ exec (@sql)
Đây là câu hỏi của tôi:
'SET @RowCount = (select count(*)
FROM dbo.Comm_Services
WHERE CompanyId = '+cast(@CompanyId as char)+' and '[email protected]+')'
Biến sẽ ra khỏi phạm vi trong cuộc gọi cho 'EXEC ('...')'. –