相关疑难解决方法(0)

Trigger to get next prefixed ID: Is there a better way?

I have a projects table:

+------------+-----+
| PROJECT_ID | ... |
+------------+-----+
| LC000001   |     |
| LC000002   |     |
| LC000003   |     |
| LC000004   |     |
| LC000005   |     |
+------------+-----+
Run Code Online (Sandbox Code Playgroud)

As you can see, the PROJECT_ID column has a text datatype (NVARCHAR2) and it has a prefix (LC).

I'm guessing that creating an ID with a prefix might have been a been a poor design choice. But, right or wrong, this is how …

trigger oracle uniqueidentifier oracle-12c

2
推荐指数
1
解决办法
1268
查看次数

标签 统计

oracle ×1

oracle-12c ×1

trigger ×1

uniqueidentifier ×1