Solved

show tables using sql92

Posted on 2003-10-29
4
390 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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…

747 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

11 Experts available now in Live!

Get 1:1 Help Now