Welcome! Log In Create A New Profile

Advanced

Selecting columns from a sub-query

Posted by Nirav 
Nirav
Selecting columns from a sub-query
January 20, 2009 05:47AM
Hi,

I am trying to do something like this:


Selecting columns from a sub-query.
For e.g:
SELECT col1,col3 FROM
(SELECT col1, col2, col3, col4, col5)

I am not able to do this.

This is done using following:
Query type: "Enter the SQL Code"

Do share your thoughts.

Thanks,
Nirav.
Firetox
Re: Selecting columns from a sub-query
January 20, 2009 08:34AM
Hello

try this

SELECT tmp.col1,tmp.col3 FROM
(SELECT col1, col2, col3, col4, col5 From myTable ) as tmp

Regards
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: