Skip to content

Instantly share code, notes, and snippets.

@wdjunaidi
Created February 22, 2012 21:13
Show Gist options
  • Save wdjunaidi/1887309 to your computer and use it in GitHub Desktop.
Save wdjunaidi/1887309 to your computer and use it in GitHub Desktop.
Finding PK name in Sybase
select i.name
from sysindexes i, sysobjects o
where o.name = @table_name
where i.id = o.id
and i.status2 != 0
and i.status2 != 512
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment