Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Saturday, February 8, 2014

Oracle Select * and other fields



Hi,

Couldn't find a quick Google answer to this so hopefully this helps some one.

If you want to SELECT * in an Oracle database, but at the same time SELECT multiple custom fields, do the following:

SELECT *, NAME.Column FROM DUAL NAME;


Where NAME is a table alias you invent yourself for any table (not just DUAL).

Using a table alias is also the solution for problems with subqueries and column name issues.