Loading ...
Sorry, an error occurred while loading the content.
 

RE: [SQLQueriesNoCode] To list tables

Expand Messages
  • John Warner
    There are SQL statements that will give you the column count, the column names and info about the tables in a database. But this information is specific to
    Message 1 of 4 , Dec 13, 2005
      There are SQL statements that will give you the column count, the column
      names and info about the tables in a database. But this information is
      specific to each DBMS. So without knowing that, few will be able to help
      you (other then offering how they do it for their 'favorite' DBMS which
      may or may not be the one you are using.

      John Warner


      > -----Original Message-----
      > From: SQLQueriesNoCode@yahoogroups.com
      > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of vinod_katare
      > Sent: Tuesday, December 13, 2005 6:51 AM
      > To: SQLQueriesNoCode@yahoogroups.com
      > Subject: [SQLQueriesNoCode] To list tables
      >
      >
      > Hi,
      > I want to know is there any command or method in java so as to list
      > the tables in given database using java.sql or anyother package
      >
      > Thanks,
      > Vinod K
      >
      >
      >
      >
      >
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > --------------------~-->
      > 1.2 million kids a year are victims of human trafficking.
      > Stop slavery. http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/m7folB/TM
      > --------------------------------------------------------------
      > ------~->
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
    • vinod_katare
      Hi, I m using the IBM DB2 as the DBMS.. ... column ... information is ... to help ... which ... vinod_katare ... list ...
      Message 2 of 4 , Dec 13, 2005
        Hi,
        I m using the IBM DB2 as the DBMS..
        --- In SQLQueriesNoCode@yahoogroups.com, "John Warner" <john@j...>
        wrote:
        >
        > There are SQL statements that will give you the column count, the
        column
        > names and info about the tables in a database. But this
        information is
        > specific to each DBMS. So without knowing that, few will be able
        to help
        > you (other then offering how they do it for their 'favorite' DBMS
        which
        > may or may not be the one you are using.
        >
        > John Warner
        >
        >
        > > -----Original Message-----
        > > From: SQLQueriesNoCode@yahoogroups.com
        > > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of
        vinod_katare
        > > Sent: Tuesday, December 13, 2005 6:51 AM
        > > To: SQLQueriesNoCode@yahoogroups.com
        > > Subject: [SQLQueriesNoCode] To list tables
        > >
        > >
        > > Hi,
        > > I want to know is there any command or method in java so as to
        list
        > > the tables in given database using java.sql or anyother package
        > >
        > > Thanks,
        > > Vinod K
        > >
        > >
        > >
        > >
        > >
        > >
        > >
        > >
        > > ------------------------ Yahoo! Groups Sponsor
        > > --------------------~-->
        > > 1.2 million kids a year are victims of human trafficking.
        > > Stop slavery.
        http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/m7folB/TM
        > > --------------------------------------------------------------
        > > ------~->
        > >
        > >
        > > Yahoo! Groups Links
        > >
        > >
        > >
        > >
        > >
        > >
        > >
        >
      • John Warner
        Don t know DB2 enough to help you, but the general idea is (you will need to check your documentation for specifics) You query the master table of the DBMS
        Message 3 of 4 , Dec 14, 2005
          Don't know DB2 enough to help you, but the general idea is (you will
          need to check your documentation for specifics)
          You query the master table of the DBMS installation. In Oracle and SQL
          Server and MySQL and Sybase etc there is a Master database that the DBMS
          uses to keep track of things, could be named anything, created when you
          first install the product. This master database will have tables for
          keeping up with user created databases and columns and such objects. It
          will have a table of tables that will contain the data you want.. Here
          the documentation comes in, that will tell you what table(s) in the
          master hold what information, there might be a table that keeps up with
          columns in user created databases, another that keeps up with table
          definitions etc.

          Hope you get the idea here. Wish I could tell you more, but I have
          almost no contact with DB2 anymore and thus no access to the docs.

          John Warner


          > -----Original Message-----
          > From: SQLQueriesNoCode@yahoogroups.com
          > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of vinod_katare
          > Sent: Tuesday, December 13, 2005 11:06 PM
          > To: SQLQueriesNoCode@yahoogroups.com
          > Subject: [SQLQueriesNoCode] Re: To list tables
          >
          >
          > Hi,
          > I m using the IBM DB2 as the DBMS..
          > --- In SQLQueriesNoCode@yahoogroups.com, "John Warner" <john@j...>
          > wrote:
          > >
          > > There are SQL statements that will give you the column count, the
          > column
          > > names and info about the tables in a database. But this
          > information is
          > > specific to each DBMS. So without knowing that, few will be able
          > to help
          > > you (other then offering how they do it for their 'favorite' DBMS
          > which
          > > may or may not be the one you are using.
          > >
          > > John Warner
          > >
          > >
          > > > -----Original Message-----
          > > > From: SQLQueriesNoCode@yahoogroups.com
          > > > [mailto:SQLQueriesNoCode@yahoogroups.com] On Behalf Of
          > vinod_katare
          > > > Sent: Tuesday, December 13, 2005 6:51 AM
          > > > To: SQLQueriesNoCode@yahoogroups.com
          > > > Subject: [SQLQueriesNoCode] To list tables
          > > >
          > > >
          > > > Hi,
          > > > I want to know is there any command or method in java so as to
          > list
          > > > the tables in given database using java.sql or anyother package
          > > >
          > > > Thanks,
          > > > Vinod K
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
          > > > ------------------------ Yahoo! Groups Sponsor
          > > > --------------------~-->
          > > > 1.2 million kids a year are victims of human trafficking.
          > > > Stop slavery.
          > http://us.click.yahoo.com/.QUssC/izNLAA/TtwFAA/m7folB/TM
          > > > --------------------------------------------------------------
          > > > ------~->
          > > >
          > > >
          > > > Yahoo! Groups Links
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
          > >
          >
          >
          >
          >
          >
          >
          > ------------------------ Yahoo! Groups Sponsor
          > --------------------~-->
          > AIDS in India: A "lurking bomb." Click and help stop AIDS
          > now. http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/m7folB/TM
          > --------------------------------------------------------------
          > ------~->
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.