[英]Not all table names returned via my sql select
When I use the select below, it returns only the name of one table. 当我使用下面的选择时,它仅返回一个表的名称。 I have like 50 tables in my database that start with "Co" in their names.
我的数据库中有50个表,它们的名称以“ Co”开头。
SELECT name FROM sysobjects WHERE name LIKE 'Co%' ORDER BY name
It returns only 1 name "CoMyitems" which is one of the 50 tables. 它仅返回1个名称“ CoMyitems”,这是50个表之一。 I would like to see all 50 names of the tables.
我想查看表的所有50个名称。
It could be a case error where your tables are CO. 如果您的表是CO,则可能是大小写错误。
Try: 尝试:
SELECT name
FROM sysobjects
WHERE UPPER(name) LIKE 'CO%'
ORDER BY name
If that doesn't work it is likely a permissions issue. 如果这不起作用,则可能是权限问题。 Run the statement without the where clause and verify you can see the tables you want without any restrictions.
运行不带where子句的语句,并验证您可以不受限制地查看所需的表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.