Special puppet cases in the Oracle database

xiaoxiao2021-04-11  1.2K+

The puppet case is a field that does not exist in the table, but the value can be returned when the query is. For example, the current time of the query system can be used by sysdate. DUAL is a virtual table provided by the system, we can query the current time of the system by the following SQL statement.

SQL> SELECT SYSDATE from DUAL;

In general, you can use the DUAL table to get the system information or the format of the verification value.

Patent Name Related Description Sequence.NextVal Sequencer The next sequence value Sequence.Currval sequence generator generated the depth of the current sequence value LEVEL query, generally used for tree inquiry ROWID to indicate data row's exact storage location ROWNUM retrieved data Row Sequence Number Sysdate Current Time and Date UID Current User Tagno User User Login into the Database

An example of establishing a sequence of use

SQL> CREATE SEQUENCE LYQ_SEQUENCE INCREMENT BY 1 NOCYCLE; SQL> SELECT LYQ_SEQUENCE.NEXTVAL from DUAL

转载请注明原文地址: http://www.9cbs.com/read-133594.html

New Post(0)