We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,970 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Select Alias in query from database

Hi,
I have a select query. I want to make name of one column from database like this

select columnA as (SELECT value from table2 WHERE nr=55) FROM table1

Is this possible in mysql. I have tried to run the query but it is saying that something is wrong with the syntax.
Thanks in advance.

2
Contributors
1
Reply
1 Hour
Discussion Span
7 Months Ago
Last Updated
2
Views
saadi06
Junior Poster in Training
96 posts since Oct 2010
Reputation Points: 12
Solved Threads: 2
Skill Endorsements: 1

AS should come after:

SELECT value AS columnA FROM table2 WHERE nr=55
pritaeas
Posting Prodigy
Moderator
9,285 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,457
Skill Endorsements: 86

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0622 seconds using 2.64MB