Purpose is to allow a insert script to add data to all tables in schema, such that it doesn't create any conflict in constraint. i take tables from information_schema.tables and take constraints from information_schema.table_constraints but not sure how to compare to sort tables in order of foreign key constraints. Please favour. Purpose is to allow a insert script to add data