Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Query Analyzer. How to display a column value?

Status
Not open for further replies.

vikoch

Programmer
Feb 6, 2008
38
US
I am testing my stored procedure and I need to display a specific column value between the lines of my code. What command do I have to use?
Thanks
 
Select ColumnName From TableName

-------------------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
Yes, I have a select statement.
But, I need to display what I selected from that column.
 
Declare @a varchar(10)

Select @a = ColumnName from TableName
Print @a

-------------------------------------------------------------------------------------------------------------------------
"Now I can look at you in peace; I don't eat you any more." Franz Kafka, while admiring fish in an aquarium
 
Yes, I want to read it while I am reading my code (comments)
thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top