27 September 2012

SQL Server: Table Variable

DECLARE @tablename TABLE
(
  idfield INT,
  namefield VARCHAR(50)
)

INSERT @tablename (idfield, namefield) VALUES (1, 'Rani Irsan')
INSERT @tablename (idfield, namefield) VALUES (2, 'Bangun Raharjo')

SELECT * FROM @tablename

0 comments: