![]() set serveroutput onįOR cursor1 IN (SELECT * FROM USER_TABLES ORDER BY TABLE_NAME)ĭBMS_OUTPUT.PUT_LINE('TABLE NAME :' || cursor1.TABLE_NAME) ĭBMS_OUTPUT.PUT_LINE('-') ĭBMS_OUTPUT.PUT_LINE('column_name,date_type,date_length') įOR cursor2 IN (select column_name, data_type, data_length from user_tab_columns where TABLE_NAME=cursor1.TABLE_NAME ORDER BY COLUMN_NAME)ĭBMS_OUTPUT.PUT_LINE(lumn_name || ',' || cursor2.data_type || ',' || cursor2.data_length ) ĭBMS_OUTPUT. There are many other ways to see all related tables and you can download working scripts. Here is the PLSQL query that does the job without you having to copy, but the only problem here is the formatting but that can be matched by rewriting to suit your need. If the user creating the view is not the owner of the table or tables on which the view is based, the table owner must grant the view creator at least the. You can also run a query to find all tables within a PL/SQL procedure. The PLSQL Query without DESC to describe tables Once the result is printed with a table prefixed with desc you can execute all of them in bulk to get results. If you want to get all the tables across all the schema you can use all_tables instead of user_tables select 'desc '||table_name If you prefer to do that you can use the following SQL snippet to get all your tables in your schema select 'desc '||table_name In the Connections navigator in SQL Developer, navigate to the Tables node for the schema that includes the table you want to display. to get the list tables and adding DESC before it and executing it later. I had a similar requirement and I came to know that DESC does not work within PLSQL. See Section 13.2.10.3, UNION Clause, and. ![]() ![]() Expand the APPUSER node in Oracle SQL Developer. You created the APPUSER schema in the Administering User Accounts and Security tutorial. Configure from SQL Developer Oracle REST Data Services (ORDS) : Authentication. In this topic you create a new table in the APPUSER schema. It is not so efficient to use DESC for all the tables one after another. SELECT is used to retrieve rows selected from one or more tables, and can include UNION statements and subqueries. Grant permissions to CREATE SESSION, CREATE TABLE, CREATE PROCEDURES. At times, while we want to get a list of tables and their columns along with their data types from Oracle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |