dailyUnknown
dailyUnknown

Reputation: 150

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.

Upvotes: 0

Views: 169

Answers (1)

Vulcronos
Vulcronos

Reputation: 3456

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.

Upvotes: 1

Related Questions