sqlserver 2005 获取表的主键和外键列名
摘要:
select * from sysforeignkeys获取表外键 SELECT *FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME='T_GOODPRICE'获取主键,最简便的句子 SELECT name FROM SysColumns WHERE id=Object_Id('表名') and colid in (select k... 阅读全文
posted @ 2011-08-02 17:59 九叶儿 阅读(1595) 评论(2) 推荐(0) 编辑