How can i get the list of constraints for a particular schema.
I gave this query String s = "SELECT cols.name, c_obj.name ,t_obj.name FROM sysobjects t_obj, sysobjects c_obj, syscolumns cols WHERE t_obj.name = 'checkpr' AND cols.id = t_obj.id AND c_obj.id = cols.cdefault AND c_obj.xtype = 'D'";
This gives me the list of default constraints for all the schemas which has the table name as 'checkpr'.
I need to list of default constraints for a particular schema only.
Experts!!Please help me as i can go further in my project only when i can solve this.
Select table_name,column_name from information_schema.COLUMNS where column_default is not null
Failing to plan is Planning to fail
sorry... but this does not give the name of the constraints.It give me the column names which has the default constraints "How can i get the list of the default constraints for a particualar schema." As I need to drop the constraints for that schema.