tags:

views:

32

answers:

1

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 better way to do this.

A: 

Create a UUID but remove the non AlphaNumerics.

Preet Sangha