简体   繁体   中英

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.

SELECT name FROM sysobjects WHERE name LIKE 'Co%' ORDER BY name

It returns only 1 name "CoMyitems" which is one of the 50 tables. I would like to see all 50 names of the tables.

It could be a case error where your tables are 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM