This is a MS SQL Server forum, not Sybase. Although they are closely related, you would be better off using a Sybase forum.
list of primary keys - Sybase DB.
Hello friends
.
I need the list of the primary keys for each table in a database . if a table has 1 key or 2 primary keys . it should show me in result set.
.
Please help me with the query . i am using the below "sp_pkeys". it is giving me correct and required result set .
exec sp_pkeys 'tableName'
but i need a Query .
My database is Sybase 15
2 answers
Sort by: Most helpful
-
-
CathyJi-MSFT 21,096 Reputation points Microsoft Vendor
2021-11-10T02:24:49.143+00:00 Hi @Rakesh Dhar ,
Welcome to MS Q&A forum.
Your issue is related to Sybase DB. SQL server general and sql-server-transact-sql tags are talking about MS SQL server tech issues. Suggest you to create a new thread on Sybase DB forum. People there will give you a better help.
https://stackoverflow.com/questions/tagged/sybase
By the way, this a similar thread, please check if the solution from this thread could help you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.