Oracle getting started Tutorial: DB2 system information table

Source: Internet
Author: User

In Oracle, if you want to view the current date and time, use select sysdate from dual;

So is there a system table like dual in oracle in db2? The answer is yes at the time, that is, sysibm. sysdummy. The schema of the front edge must be added; otherwise, an error will be reported if the schema you use is not sysibm.

You can use the following statement:

Select current_date, current_time, current_timestamp from sysibm. sysdummy1;

1 2 3

-------------------------------------------------------------------------

2011-10-10 10:23:39 2011-10-10-10.23.39.953000

 

At the same time, if there is another interesting values in db2cmd

Db2 => values current_date ---- display the current date

Db2 => values current_time ---- display the current time

Db2 => values current_timestamp ---- display the current Timestamp

Db2 => values 1 + 2 ---- displays the value of 1 + 2, which can be used as a calculator. Convenient

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.