SQL for views with constraints
365207Aug 27 2007 — edited Aug 28 2007We use a product that requires us to have pk's on all of our views. So when I generate the SQL using DBMS_METADATA or using SQL Developer we have to keep the original scripts so that we can manually insert the constraint definition into the generated script.
I noted that while browsing the SQL tab for each view I can see the constraint in the view definition. So where is this tab generating it's SQL from? It's not in the text of the view, and dbms_metadata does not seem to do it.
It would be useful for me to be able to generate them with the constraint in the text already as this process that we do now is cumbersome.
Can anyone tell me where/how I can do that?
Cheers,
Henri