CREATE PROCEDURE AAA @COLNUM smallint AS DECLARE @TESTFIELD varchar(100) DECLARE @RESULT varchar(100) set @TESTFIELD = COL_NAME(OBJECT_ID('Northwind.dbo.Employees'),@COLNUM ) DECLARE Employee_Cursor CURSOR FOR SELECT @TESTFIELD FROM Northwind.dbo.Employees OPEN Employee_Cursor FETCH NEXT FROM Employee_Cursor into @RESULT PRINT @RESULT CLOSE Employee_Cursor DEALLOCATE Employee_Cursor GO
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams