一、对于p_get_usertable中的语句:
1、获取所有用户表(并且架构为dbo。感觉可以不要该限制)的表名:
select a.name from sysobjects a,sysusers b where a.xtype = 'u' and b.uid = a.uid and b.name = 'dbo'
以上的系统表为sql server2000 ,可以使用sql server 2005之后的系统基表:
select name from sys.objects where type = 'u' and SCHEMA_NAME(schema_id) = 'dbo'
标签:语句,name,dbo,视图,SERVER,SQL,select,uid From: https://www.cnblogs.com/sound-of-wind-rain/p/16599532.html