Solved

show tables using sql92

Posted on 2003-10-29
4
397 Views
Last Modified: 2008-02-01

Am running frontbase on linux, and am using the command line tool sql92.

Can connect to a database using...

sql92#7> connect to testdb user _system;

how do i interigate the database so that i can get a list of the tables in that datbase.

Any ideas?
0
Comment
Question by:toakeley
4 Comments
 
LVL 35

Accepted Solution

by:
David Todd earned 63 total points
ID: 9649000
Hi,

Try

select *
from information_schema.tables

SQL Server Books on Line lists this as part of SQL-92 standard.

Regards
  David
0
 
LVL 4

Assisted Solution

by:vk33
vk33 earned 62 total points
ID: 9649669
Hi!

An extract from SQL-92 specification:

         CREATE VIEW TABLES
              AS SELECT
                TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE
              FROM DEFINITION_SCHEMA.TABLES
                  WHERE ( TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME )
                    IN (
                        SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME
                         FROM DEFINITION_SCHEMA.TABLE_PRIVILEGES
                           WHERE GRANTEE IN ( 'PUBLIC', CURRENT_USER )
                        UNION
                        SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME
                         FROM DEFINITION_SCHEMA.COLUMN_PRIVILEGES
                           WHERE GRANTEE IN ( 'PUBLIC', CURRENT_USER ) )
                  AND TABLE_CATALOG
                    = ( SELECT CATALOG_NAME FROM INFORMATION_SCHEMA_
              CATALOG_NAME )

You can see the full document here (it's quite large!):

http://luuk.xs4all.nl/sql/sql1992.txt

Regards!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now