what is the sql server 6.5 equivalent for:
"select catalog_name from information_schema.schemata"
i would like to see a list of available schema's on a server
and this seems to work on 7.0 and newer. would i be able to do
it with the systables ? i have looked through the content of the
systables but i can's see a 'schema' column in any of them.
any help is appreciated.
thanks,
tomINFORMATION_SCHEMA.SCHEMATA shows all databases, not all tables. In
fact, it looks like the documentation is wrong here - according to BOL
2000, the view should list each database "that has permissions for the
current user", however in reality it returns all databases, whether or
not the user can access them. So in SQL 6.5 you can just do this:
select name
from master.dbo.sysdatabases
In MSSQL 2000, you could use HAS_DBACCESS() to show only the DBs which
the user can access, but I don't think there's an equivalent in SQL
6.5.
Simon|||thanks for that simon, it did the trick !!
No comments:
Post a Comment