开发者

Creating database constraints on tables on the fly

I am creating tables from java on the fly as they are needed. Now to define constraints and indexes on these tables we need to come up with unique names.

I am planning to query the system views to get the constraint and index system views to get a list of all existing names and then come up with a random name and check against these values.

I am doing this since the table name itself might not be unique after being truncated to include the PK suffix.

Is there a be开发者_如何转开发tter way to do this.


Create a UUID but remove the non AlphaNumerics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜