fjtello / SQL-C-sharp

Common programming and coding tips and howtos
0 stars 0 forks source link

SQL hints [#execute #sp_executesql] #23

Open fjtello opened 7 years ago

fjtello commented 7 years ago

DECLARE @sql AS NVARCHAR(4000);

SET @sql = 'SELECT TOP 10 * FROM tabla;';

EXEC sp_executesql @sql;