How get all table name from database

hi master
sir
how get all table name from database

The big question is 'why'.
Selecting from view 'dba_tables' will indeed give the list of all tables in the database, but that includes the dictionary tables and the internal tables, and many others that are probably not of interet to a person who needs to ask this question. Besides, the dba_tables view requires access to a DBA account.
There are several other views: "user_tables" will list all the tables in this user's schema; and "all_tables" will list all the tables this user can access in some way.
The above do not, of course, include any information about synonyms, sequences, views, indexes and so on.
The correct answer and the meaningful answer may be two different things.

Similar Messages

  • EF 5 Model First Approach- How to avoid Table names from pluralized

    I'm using Entity Framewrok 5.0 Model First approach using Visual Studio 2012 express. The generated database tables are pluralized. How do I avoid this? Please advice. I'm using Model First approach (Designed the entities in the EF designer and generated
    the Database.) . Please note that following technic does not apply to this scenario as it applies to code - first approach.
    using System.Data.Entity.ModelConfiguration.Conventions;
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();

    Hi Arasheed,
    Welcome to the MSDN forum.
    I tested your problem. It seems a default setting that Table names are pluralized. If you want to avoid pluralizing, you can do it manually:
    Right click the empty area and select “Generate Database from Model…”.
    Choose the correct connection and click “Next”.
    You will see the generated DDL. Please copy all the content, then click “Cancel”.
    Click “Data” on the Visual Studio bar and select “Tansact-SQL Editor”. Then click “New Query Connection…”.
    Connect to the right server.
    Paste the DDL we copied before.
    Modify the table creation lines. Note: do not forget to change the corresponding name in constraints.
    Right click the empty area and click “Execute SQL”.
    In addition, you can submit your feature requests here to improve Entity Framework:
    http://data.uservoice.com/forums/72025-ado-net-entity-framework-ef-feature-suggestions
    Good day.
    Alexander Sun [MSFT]
    MSDN Community Support | Feedback to us

  • Get the table names from a specified schema name

    Can't any one can hlep me how to use OCIDescribeAny() to retrive the list of table names for a given schema name?
    I have problem when I connect to the database using syste as usr id. I can't ge the table name form the SCOTT schema.

    If I understand you correctly, I don't think OCIDescribeAny() is the way to go.
    You can get a list of tables owned by a particular schema by using the following SQL:-
    SELECT TABLE_NAME FROM DBA_TABLES WHERE OWNER = 'SCOTT'
    Just change the where clause to your needs.
    Regards.
    Adrian

  • How get all child elements from XML

    Hi
    I have one xml i tried to parse that xml using dom parser and i need to get some child elements using java
    <Group>
    <NAME>ABC</NAME>
    <Age>24</AgeC>
    ---------some data here......
    <Group1>
    <group1Category>
    <NAME>ABCTest</NAME>
    <age>27</Age>
    ----Some data here
    <group1subcategory>
    <subcategory>
    <NAME>ABCDEF</NAME>
    <age>28</Age>
    my intention was
    get group name (here ABC) i need all other name value from group1category ,group1 subcategory but pblm that
    my xml contains any number of Group nodes...but only i want name contains ABC
    i wriiten code like this
    DocumentBuilderFactory factory = DocumentBuilderFactory
    .newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(xmlFile);
    NodeList nodeList = document.getElementsByTagName("*");
    for (int i = 0; i < nodeList.getLength(); i++)
    Element element = (Element) nodeList.item(i);
    what is next step i need to do..please help

    964749 wrote:
    Sorry for inconvenience caused..i only asked if any ideas i not ask any body to spent time for me...
    This is simple code developed using xpath..i not know how i proceed further
    public class Demo {
    public static void main(String[] args) {
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    try {
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    Document dDoc = builder.parse("hello.xml");
    XPath xpath = XPathFactory.newInstance().newXPath();
    javax.xml.xpath.XPathExpression expr = xpath.compile("//Group/NAME");
    Object Name= expr.evaluate(dDoc, XPathConstants.STRING);
    System.out.println(Name);
    } catch (Exception e) {
    e.printStackTrace();
    i need get group name (here ABC) i need all other name value from group1category ,group1 subcategory but pblm that
    ..how i done in XPATH and also do manipulation of remining result...
    i also try with DOM like
    NodeList nodeList = document.getElementsByTagName("GROUP");
    for (int i = 0; i < nodeList.getLength(); i++)
    Element element = (Element) nodeList.item(i);
    if (element.getNodeName().matches("ECUC-MODULE-DEF"))
    String str=((Element) nodeList.item(i)).getElementsByTagName("NAME").item(0).getFirstChild().getNodeValue();
    if(str.equalsIgnoreCase("abc")){
    NodeList children = element.getChildNodes();
    for (int k = 0; k < children.getLength(); k++) {
    Node child = children.item(k);
    System.out.println("children"+children.getLength());
    if (child.getNodeType() != Node.TEXT_NODE) {
    if(child.getNodeName().equalsIgnoreCase("Group1"))
    how iterate for particular ABC name to group1 and subcategoryFew things
    1. Use code tags to format code
    2. Explain the problem statement clearly. Take time to formulate your question. Explain what you expect from your code and what you are getting along with any exceptions that are being thrown

  • Getting table name from a query

    Hi, I'm trying to get the table name from my sql query
    My code is as follows;
    ResultSetMetaData metadata = rs.getMetaData();
    for (int i = 1; i < metadata.getColumnCount(); i++)
    System.out.println(metadata.getTableName(i));
    I just get a blank output. Yet my sql query executes and I can pull down the records, and grab the column names from the result sets.
    Any ideas on how I can get the table name for the columns. The reason being is on one of my querys I'm using join statements and i need to retrieve the table name for the column i'm displaying, as some tables have similar column names.
    Thanks in advance.

    Hi,
    What db are you using?
    I also get a blank output with ResultSetMetaData.getTableName because Oracle doesn't implement this method.
    Why do you not know the table name anyway?
    regards
    Nick

  • Table name from field

    Dear Sapers,
    How to find table name from field name to write functional spec.Pl elaborate it for normal & zdevelopment.Points will be rewarded for useful answer.
    Thanks in advance.

    Hi Uday,
    Just for the sake of help this reply......
    You can find the name of tables by using F1 button keeping cursor on the respective field that you want to bring in development. From there you have to move to Technical details through technical details button.
    If that field or values are getting saved into some structure then you have to search the right database tables. According to your module many database tables are there (that you can search from sdn.sap.com directly). That totally depends on your report/development that you want to bring in......
    In any development deciding the right table for start up ( I mean to say tables that will give you input fields in your FS) is critical, latter you have to search linking tables and have to give logic about how to pass values from what to what field and what to what table..... In this case Transaction code SE11 and SE16 are useful......
    This all is slightly confusing and tedious too...... Closely work with you ABAPer to get into many things and have successful development....
    Have nice development....
    Cheers!
    Abu Arbab

  • How to find table name and field name thru Tcode

    Hi,
         how to find out table name and field names thru transaction code..........plz point out step by step.

    Hi
    I am not getting your question... as i understand, if you go to SE84 tcode you can get it.
    Go to SE84.Select ABAP Dictionary sub tree. Double click on "database tables'. Give some number in "Maximum number of hits”. DONT GIVE ANY OTHER INPUTS. Just press F8. You will get all table names.
    For fields also do like this by selecting FIELDS sub tree.
    Reward if it is useful.
    Thanks
    Siva Kumar

  • Get all html files from a url

    Hi I am trying to do a website copyer and i don't know how get all the html from a url.
    By example:
    I want get all files html from http://forum.java.com/
    aAnybody has an idea of how to do this?
    Thanks

    Not easy. First, you'll have to look at networking programming - how to make URL connections etc.. Then, you'll have to look at HTML parsers - how to extract links, images, etc. from an HTML page. Also, you'll have to know how to do file I/O in order to save the HTML files obtained.
    I don't know of any Java-based web site copier open source projects that you can refer to, but you can take a look at the source code for projects such as HttpUnit and HtmlUnit. They contain code that'll help you with your web site copier.
    Good luck!

  • How to get only column names from different tables as single table columns

    Hi All,
       I have one requirement in which we want only column names from different tables.
    for example :
     I have three tables T1 ,T2, T3 having
      col1 clo2 clo3 -->  T1 , 
      col3 col5 ,clo6 --> T2 ,
      Clo6 col8 col9 --> T3
    columns i want to get only all  Column names from all table as single Resultset not any data from that how can i get that empty resultset 
    because this empty result i want to bind in datagridview(front end) as Empty resultset 
    Please tell me anyways to do this
    Niraj Sevalkar

    If I understand you want an empty result set, just with metadata. SET FMTONLY do the trick:
    SET FMTONLY ON
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    SET FMTONLY OFF
    Another alternative is to include an imposible contition
    SELECT Col1, Col2, Col3, ....., Coln
    FROM
    T1 CROSS JOIN T2 CROSS JOIN T3
    WHERE 1 = 0
    If you are using a SqlDataAdapter in your client application. You can use the FillSchema method. the select command may be any select statement that returns the columns you want. Under the covers FillSchema will call SET FMTONLY ON.
    If you are using SqlCommand.ExecuteReader you can pass SchemaOnly to CommandBehavior argument. SET FMTONLY ON is called under the covers. Again the select command may be any select statement that returns the columns you want.
    "No darás tropezón ni desatino que no te haga adelantar camino" Bernardo Balbuena

  • Getting table column header names from database

    Hi,
    We are trying to get table headers from database. So when we query the database it returns multiple rows at the same time. How can we display specific table column headers from the returned result set at respective places.
    We tried using record selection expert but that only works for one selection and not for others.
    How can we do this?

    Thank you Josh and Abhilash for helping us.
    We are using PostgreSql.
    "command_headers" has query which looks like following-
    SELECT id, header  FROM labels
    WHERE id='header.header_1'
    OR id='header.header_2'
    OR id='header.header_3'
    ORDER BY id;
    which will return following result set-
    id                              header
    header.header_1        Header1
    header.header_2        Header2
    header.header_3        Header3
    Our Table structure is something like this-
    Page Header: Header1                        |  Header2                       | Header3                    
    Details:           {command_data.value1} | {command_data.value2} | {command_data.value3}
    command_data is another command which generates data for the table.
    All values in details section coming from command_data is in format string.
    We don't need to apply grouping or sub totals. This is a simple table, showing string values for all columns.
    Preview:
    Header1     |     Header2     |     Header3
    car              |     yello           |     abc
    bike            |     black          |     xyz
    plane          |     white           |     pqr
    Currently, all headers are static labels. How do we use "command_headers" to display all table Headers dynamically? Can we achieve this format using cross tab?

  • Newbie ques : How to get the list of all tables in the database

    Hi,
    I'm very new to Oracle (using Oracle8i currently). I wanted to know if there is a way to get the list of all tables in the database. Like in mySQL you can use the command " show tables" to get the list of all the tables.
    Any help will e greatly appreciated. Please "cc" any reply to [email protected] also.
    thanks
    Deven

    Hi
    Select table_name, owner from all_tables;
    will give u all the tables in the database.
    all_tables, dba_tables, user_tables
    all_objects, dba_objects, dba_objects
    there are many, more tables. login as system and query the tab and try to describe the tables.
    Thanks
    Malar

  • How to get data in jtable from database

    i m working on core java application i want to use jtable to show records to user. jtable will get records from mssql database. how to do this.. i m new so plz tell me briefly..with coding...
    thanks

    i have use this link:
    import java.sql.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    * This class takes a JDBC ResultSet object and implements the TableModel
    * interface in terms of it so that a Swing JTable component can display the
    * contents of the ResultSet. Note that it requires a scrollable JDBC 2.0
    * ResultSet. Also note that it provides read-only access to the results
    public class ResultSetTableModel implements TableModel {
    ResultSet results; // The ResultSet to interpret
    ResultSetMetaData metadata; // Additional information about the results
    int numcols, numrows; // How many rows and columns in the table
    * This constructor creates a TableModel from a ResultSet. It is package
    * private because it is only intended to be used by
    * ResultSetTableModelFactory, which is what you should use to obtain a
    * ResultSetTableModel
    ResultSetTableModel(ResultSet results) throws SQLException {
         this.results = results; // Save the results
         metadata = results.getMetaData(); // Get metadata on them
         numcols = metadata.getColumnCount(); // How many columns?
         results.last(); // Move to last row
         numrows = results.getRow(); // How many rows?
    * Call this when done with the table model. It closes the ResultSet and
    * the Statement object used to create it.
    public void close() {
         try { results.getStatement().close(); }
         catch(SQLException e) {};
    /** Automatically close when we're garbage collected */
    protected void finalize() { close(); }
    // These two TableModel methods return the size of the table
    public int getColumnCount() { return numcols; }
    public int getRowCount() { return numrows; }
    // This TableModel method returns columns names from the ResultSetMetaData
    public String getColumnName(int column) {
         try {
         return metadata.getColumnLabel(column+1);
         } catch (SQLException e) { return e.toString(); }
    // This TableModel method specifies the data type for each column.
    // We could map SQL types to Java types, but for this example, we'll just
    // convert all the returned data to strings.
    public Class getColumnClass(int column) { return String.class; }
    * This is the key method of TableModel: it returns the value at each cell
    * of the table. We use strings in this case. If anything goes wrong, we
    * return the exception as a string, so it will be displayed in the table.
    * Note that SQL row and column numbers start at 1, but TableModel column
    * numbers start at 0.
    public Object getValueAt(int row, int column) {
         try {
         results.absolute(row+1); // Go to the specified row
         Object o = results.getObject(column+1); // Get value of the column
         if (o == null) return null;
         else return o.toString(); // Convert it to a string
         } catch (SQLException e) { return e.toString(); }
    // Our table isn't editable
    public boolean isCellEditable(int row, int column) { return false; }
    // Since its not editable, we don't need to implement these methods
    public void setValueAt(Object value, int row, int column) {}
    public void addTableModelListener(TableModelListener l) {}
    public void removeTableModelListener(TableModelListener l) {}
    the table is showing column name from database but not showing the data in row now what to do

  • How to find out all table names which has a particular data

    Hi,
    How could i get all the table names from a database(for a schema) which has data 'KST6490' in one of the fileds in the table.There are many tables with this
    data. Data type is Varchar2. Thanks.

    One approach would be to create a procedure which retrieves the name of all tables in the schema using the user_tables view. Then use the user_tab_columns view to get all the column names and types. If the type is varchar2, then dynamically create a sql statement which runs a query on that column using the value which you are looking for. You would need two cursor loops for this approach: one for tables and one for columns. This approach requires good PL/SQL programming skills.
    Alternately, many query tools, such as Golden, provide a search capability on query results. Just do a select * from the table and search on the results. This would need to be done table by table and the results would have to fit in the memory available to the tool.
    Alternately, you can write table contents to a text file on the a server and then search the text file using operating system tools such as grep. This would require good OS scripting skills.

  • How to get the table name of a field in a result set

    hi!
    i have a simple sql query as
    select tbl_customerRegistration.*, tbl_customerAddress.address from tbl_customerRegistration, tbl_customerAddress where tbl_customerAddress.customer_id = tbl_customerRegistration.customer_ID
    this query executes well and gets data from the database when i get ResultsetMetaData from my result set (having result of above query) i am able to get the field name as
    ResultSetMetaData rsmd = rs.getMetaData();//rs is result set
    String columnName = rsmd.getColumnName(1);
    here i get columnName = "Customer_id"
    but when i try to get the tabel name from meta data as
    String tableName = rsmd.getTableName(1); i get empty string in table name....
    i want to get the table name of the respective field here as it is very important to my logic.....
    how can i do that.....
    please help me in that regard as it is very urgent
    thanks in advance
    sajjad ahmed paracha
    you may also see the discussion on following link
    http://forum.java.sun.com/thread.jspa?threadID=610200&tstart=0

    So far as I'm aware, you can't get metadata information about the underlying tables in a query from Oracle and/or the Oracle drivers. I suspect, in fact, that the driver would have to have its own SQL parser to get this sort of information.
    I'm curious though-- how do you have application logic that depends on the name of the source table but not know in the application what table is involved? Could you do something "cheesy" like
    SELECT 'tbl_customerRegistration' AS tbl1_name,
           tbl_customerRegistration.*
    ...Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Insert into all tables on a Database on Test Server select from all tables on a database A from production server

     
    hi Friends ,i need a suggestion from  you on how to
    insert data to all tables on a Database  "A " on Test server
    Select data from all tables on  a Database  "A" on Production Server
    where id=123
    Database A is same with Structures on Test and Production also all Tables  will have  Id column in common.
    The purpose of this insert is ,as we all know Production has the latest data and i need to push to test server on request for particular ID only  ( may be weekly once or  twice a week )
    I  have a linked server setup name "LINQ" 
    Example for one table is below , like wise i need a script which does for 154 tables.
    Insert into ABC( id, name)---insert to test server
    Select Id, name  from  LINQ.ProdSerevrname.databasename.ABC where id = 123
    Please help me ..
    Thanks

    Why not use export import wizard for this if you've read access to production?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • =( Having a problem with error codes (-1202) and (-9808)

    Everytime i have iTunes open and then click on iTunes store, i try and go to my account or purchase a song and it DOES NOT let me!!!! it just keeps saying error cose (-1202) when i try to go to manage my account and whenever i try buying a song it sa

  • How can I make one entity attribute change trigger another's default value?

    Guys and Gals, Using JDev 11.1.2.1.0 I have an order form which has a LOV (Customers) and an address field. The address field should contain the default address associated with the selected key in the LOV. To do this, I have an entity (Order) with tw

  • How do you change the directory location from the hieachy window.

    Our DAQ system consists of 285 vi's. During development changes, some vi's were created and passed to the DAQ via a LAN connection. Pulling up the vi's at the DAQ has changed the desired path such that some come from the LAN virtual drive, while othe

  • Problem with packages.p lease help me to resolve

    They are in ShoppingCart package, so create ShoppingCart folder and place these 2 java files in that folder. Then try to execute �java test� it is giving error, and see the stmts below: D:\Ashok\Received Files\ShoppingCart>dir Volume in drive D has n

  • House Bank - Storing Account Numbers

    Hi experts, When using EDI for outgoing payments - we need to provide the following account numbers for a House Bank: Domestic ACH Number International ACH Number Commercial Credit Card Number (AP Card) Paying Company Division Number Where would you