Declare @Column int
SELECT TOP 1 @Column = Column1
FROM tbl_Test WHERE Column2 = 'test'
In above query Column1, Column2 are two columns of table 'tbl_Test'.
No comments:
Post a Comment