I learned today, the field interception time, field connection method

zhaozj2021-02-16  66

The demand is such that a record number requires "P" and then followed by the annual annual "-" and primary key IDs, such as: P2004-123. SQL statement writes this:

Select 'p' || to_char (a.createtime, 'YYYY') || '-' || A.id As Number from Person A

There is also a way to use "CONCAT (STR1, STR2)" instead of "||"

Note: Please teach the old horse and Liu XX.

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

New Post(0)