General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Field names after select
I would like to combine all fields from two tables in an query.
I was using a wild card to get the field names:
select * from table1,table2 where table1.ID=table2.ID
I may not know what all the fields are at a later date, so I don't want to list them in the query.
The result of my query returns all the fields except the ID which is now stored in ID_A and ID_B. In this case ID_A and ID_B will always be the same and I would like them to be in the field ID.
I know I can build a list of fields, build a string and use it in my query, but I am hoping for something elegent and simple, if it exists.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only