Search code examples
sqlforeign-keysconstraintssybasesap-ase

Get info about foreign key on delete action


I have a Sybase database with two tables. One table refer to another with a foreign key. I need to know - is this foreign declared with any on cascade option?

I have already tried: EXEC sp_helpconstraint <table_with_constraint> but this doesn't return any on cascade information. Is there any way to get this information from Sybase without creating fake records and deleting them? sysconstraints table also keeps no information about cascade operations. What am I missing?

Server version is: ASE 15.x


Solution

  • Sybase ASE 15 does not support on cascade DDL so none of your foreign keys will have a cascade option. If you want the delete or update on cascade functionality you must implement a trigger.