Groups
Groups
Sign in
Groups
Groups
PostgreSQL 8 DBA 專業指南中文版
Conversations
About
Send feedback
Help
請問要如何知道某個欄位是不是primary key
16 views
Skip to first unread message
pch....@gmail.com
unread,
Jan 31, 2008, 2:19:04 AM
1/31/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PostgreSQL 8 DBA 專業指南中文版
我用這個語法,好像得不到有關primary key的訊息,要怎樣才能知道呢?謝謝!
select * from information_schema.columns where table_name='tables'
Kuo.C...@gmail.com
unread,
Feb 1, 2008, 12:47:53 PM
2/1/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PostgreSQL 8 DBA 專業指南中文版
您好~
請查看 information_schema 下列的二張 table 即有您要的資訊.
constraint_table_usage, constraint_column_usage
Reply all
Reply to author
Forward
0 new messages