Jcat
宠辱不惊,闲看庭前花开花落~~
posts - 173,comments - 67,trackbacks - 0

Pseudo columns

A pseudo column is an item of data which does not belong in any particular table but which can be treated as if it did. Any SELECT list of columns can include these pseudo columns.
SYSDATE         current date and time

ROWNUM          sequence number assigned to retrieved rows

ROWID           unique identifier for a row

UID             number associated with a user

USER            userid of current user

The DUAL table

ORACLE provides a "dummy" table called DUAL containing one column and one row. It is useful for selecting miscellaneous information from ORACLE.

Some uses for DUAL

  • Display today's date

    SELECT SYSDATE FROM dual;

  • Display the value of 356 divided by 17, to three decimal places

    SELECT ROUND(356 / 17, 3) FROM dual;

  • Display the current user name

    SELECT USER FROM dual;

posted on 2006-08-18 08:50 Jcat 阅读(220) 评论(0)  编辑  收藏 所属分类: Database

只有注册用户登录后才能发表评论。


网站导航: