I know I can copy a tale structure and data by
create table testtable1 as select * from sourcetable
Is there any way to actually clone everything, triggers, constraints, grants etc?
Thanks in advance. We are running 10G.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look into
dbms_metadata, especially its proceduredbms_metadata.get_ddlfunction (see this tahiti link).So, in your case, you would first do a
As per be here now‘s comment: dont forget the
dbms_metadata.get_dependent_ddl:And then work from the given output.