Exforsys
+ Reply to Thread
Results 1 to 7 of 7

Want to Get Table Names

This is a discussion on Want to Get Table Names within the MySQL forums, part of the Database category; I have written many views for performing various operations in my database. I have to now get a report of ...

  1. #1
    caradoc is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    122

    Question Want to Get Table Names

    I have written many views for performing various operations in my database. I have to now get a report of all the table names used in my views alone. Is there any way for that? Do I need to write some function of procedure for achieving this. Kindly give me some tips for doing this.


  2. #2
    cyrus is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    128
    There are various ways of achieving this. You can give command as

    sp_depends sample

    where sample denotes the view name. Replace sample with your view name.
    or you can also give the query as below:

    select * from information_schema.view_table_usage;

    These would help you get a report of all the table names used in my views alone.


  3. #3
    abhijitbuchake is offline Junior Member Array
    Join Date
    Mar 2007
    Answers
    2
    Quote Originally Posted by caradoc View Post
    I have written many views for performing various operations in my database. I have to now get a report of all the table names used in my views alone. Is there any way for that? Do I need to write some function of procedure for achieving this. Kindly give me some tips for doing this.


    u can use
    show create view view_name;
    command.


  4. #4
    geetaravula is offline Junior Member Array
    Join Date
    Nov 2008
    Answers
    2
    even i want answer to the same question by using sql or pl/sql please help me out


  5. #5
    sanereddy is offline Member Array
    Join Date
    Nov 2004
    Answers
    85
    Quote Originally Posted by geetaravula View Post
    even i want answer to the same question by using sql or pl/sql please help me out

    Oracle : select * from tabs

    SQl Server : select name, user_name(uid) from sysobjects where type='U'
    sp_tables


  6. #6
    geetaravula is offline Junior Member Array
    Join Date
    Nov 2008
    Answers
    2
    Quote Originally Posted by geetaravula View Post
    even i want answer to the same question by using sql or pl/sql please help me out


    Anyone please help me out to get table names from a view using pl/sql procedure


  7. #7
    bigclassesglobal is offline Junior Member Array
    Join Date
    Sep 2011
    Location
    INDIA
    Answers
    10
    you may also retrieve the table names from typing the following command, try the command like this

    select * from desc


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...