Es correcto hacer esto?
Porque me dá error en la segunda linea (Sintaxis incorrecta cerca de '@variable')
Ok. Y si el campo no fuese un INT sino un String (Varchar). Por ejemplo:
Código (sql) [Seleccionar]
DECLARE @variable As INT
SELECT COUNT(intIdTipoUsuario) INTO @variable FROM tblTipoUsuario
PRINT @variablePorque me dá error en la segunda linea (Sintaxis incorrecta cerca de '@variable')
Ok. Y si el campo no fuese un INT sino un String (Varchar). Por ejemplo:
Código (sql) [Seleccionar]
SELECT strTipoUsuario FROM tblTipoUsuario WHERE (intIdTipoUsuario = 1)
yo le veo otra utilidad ha esto XD 