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.

11 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
  7. It's https://adesk.cheapsoftwaredownload.net/autodesk_ecs.html secret that more and more people are buying products and services on the internet because of convenience, choice, price and instant service. Starting an online business and being part of the booming e-commerce world really is easiest business to start. But why?

    ReplyDelete
  8. It is possible to acquire a loan despite having a bad credit history. It is even possible to have a bad credit mortgage loan and a bad credit car loan at the same time. As long as you work your way in improving your credit score, the better the chances of getting a loan approved, or even two loans. buymodafinilonline.reviews

    ReplyDelete
  9. Here we discuss the reality of attaining business funding for small businesses. We address the advantages and disadvantages of private funding vs. bank funding. While there are many differences, these are different products which achieve the same end result for small businesses. google sketchup 18 download

    ReplyDelete
  10. girls usually love to hear celebrity gossips, they are always into it’ putlocker

    ReplyDelete