Link to home
Start Free TrialLog in
Avatar of HopeQ
HopeQ

asked on

How to query constraints in Sybase

I have following query works for SQL Server. Can someone help me translate it to Sybase?
USE database_name;
GO
SELECT OBJECT_NAME(OBJECT_ID) AS NameofConstraint,
SCHEMA_NAME(schema_id) AS SchemaName,
OBJECT_NAME(parent_object_id) AS TableName,
type_desc AS ConstraintType
FROM sys.objects
WHERE type_desc LIKE '%CONSTRAINT'
GO
Avatar of PortletPaul
PortletPaul
Flag of Australia image

change 'sys.objects' to 'sysobjects'

also then look at the fieldnames, here:
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc36271_36272_36273_36274_1250/html/refman/X14933.htm

and other system tables are also documented there.

ps: don't have access to Sybase myself I'm afraid
SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial