用sql获取表的主键 select pkey.name from sysobjects pkey, sysobjects where sysobjects.name='TTT' and sysobjects.id=pkey.parent_obj