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.

7 comments:

  1. It helped me. Thank you!

    ReplyDelete
  2. For me it works only as:

    SELECT NAME.*, NAME.Column FROM DUAL NAME;

    But this was helpful to figure it out, thanks.

    ReplyDelete
  3. Software development is all about thinking, planning, laying out the design. In simple design terms test, patch and dispatch post bug fixing. Marketing the software too can an important role for the success of the project as a whole. read here

    ReplyDelete
  4. The software has world-class features like Pre-Sales Query Management, Customer Help, News Subscription, etc. These features help in meeting the business needs of an organization, while paving the path for a long-term CRM strategy. SugarCRM Philippines

    ReplyDelete
  5. These templates speed up delivery and productivity time at lesser risks as they are pre-packaged and pre-configured with key Oracle technologies that can be easily downloaded and deployed quickly. Thus, they also save installation and configuration costs.
    salesforce datawarehouse

    ReplyDelete
  6. Now you can win free stuff online, free giveaways, enter every day to win latest iphones, smartphones, macbooks, laptops, accessories, technology and much more at https://ifreegiveaways.com/

    ReplyDelete