...bringing you notes from the field...

Tag Cloud


How do I select a value from a table into a variable in SQL Server?

Here's an example...

DECLARE @LocID

SELECT @LocID = LocationID
 FROM Locations
  WHERE LocationName = 'WAREHOUSE X'


  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati