• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Treasury Of New DB2 6.1 Features, Part 1: Query Enhancements

    February 4, 2009 Michael Sansoterra

    Once again I am happy to report that IBM has provided us with a wealth of enhancements to DB2 in this monumental V6R1 release. Incidentally, in case you haven’t heard, IBM is now calling our favorite database by the name DB2 for i (formerly known as DB2/400 and DB2 UDB for iSeries) and our favorite OS is called IBM i version 6.1. Now without further ado, I’ll start to rattle off some query enhancements offered in this release.

    VALUES in SELECT

    The VALUES clause can now be placed within the FROM clause of a SELECT statement or as a derived table result in a FULLSELECT. This means that you can hard-code one or more rows of values to be returned as a table within an SQL statement. Here is a sample SELECT that returns one column with five rows:

    Select *
      From (Values(1),(2),(3),(4),(5)) As Counter_Table (RowNo)
    

    The statement returns the following results:

    RowNo

    1

    2

    3

    4

    5

     

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Raz-Lee Security

    Start your Road to Zero Trust!

    Firewall Network security, controlling Exit Points, Open DB’s and SSH. Rule Wizards and graphical BI.

    Request Demo

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Remain Teams with Original to Combine Testing and Change Management Database Server/400, Anyone?

    Leave a Reply Cancel reply

Volume 9, Number 5 -- February 4, 2009
None

Table of Contents

  • A Bevy of BIFs: Look Up to %LookUp
  • Treasury Of New DB2 6.1 Features, Part 1: Query Enhancements
  • Admin Alert: Time Gobbling Tasks for a System Upgrade

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Liam Allan Shares What’s Coming Next With Code For IBM i
  • From Stable To Scalable: Visual LANSA 16 Powers IBM i Growth – Launching July 8
  • VS Code Will Be The Heart Of The Modern IBM i Platform
  • The AS/400: A 37-Year-Old Dog That Loves To Learn New Tricks
  • IBM i PTF Guide, Volume 27, Number 25
  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle