how to disable the contraint type of a field (which is present in diffrent tables ) in database using a single unix script file.
Could you elaborate on your request with an example
suppose a field name is hrid_1 , and this field is present in 20 tables and the constraint type is NOTNULL, and we want to disable all the hrid_1 field contraint using unix script file.
suppose a field name is hrid_1 , and this field is present in 20 tables and the constraint type is NOTNULL, and we want to disable all the hrid_1 field contraint using unix script file.
It depends on which data base you are connecting, what are the table names..........
a sample script to have an idead about how you can do that is.
create a file with the name tables in the below mentioned format.
table1
table2
table3
for tablename in $(cat tables)
do
database connecting statemets << EOF
alter table statements
EOF
done