How to display the ddl for a view

In oracle 11g how can I write a query which will display a view initial create MATERIALIZED view?

I know that you can click on the SQL tab in sql developer, but how can I do the same thing with a query?

Hello

996454 wrote:

In oracle 11g how can I write a query which will display a view initial create MATERIALIZED view?

I know that you can click on the SQL tab in sql developer, but how can I do the same thing with a query?

Yes, the code is in the data dictionary:

-In SQL * Plus, do this first:

VALUE LONG 8000

SELECT text

From user_views

WHERE view_name = 'MY_VIEW '.

;

You can also use dbms_metadata for getting this.

What do you mean by "seen statemnt to create initial display ?  If you create a view and then do a CREATE or REPLACE VIEW statement, then the initial definition is lost. only the most recent is kept in user_views.

Tags: Database

Similar Questions

  • How to extract the ddl for all databases of links?

    DB: oracle11gr2

    Friends,

    I can get including db link the package DBMS ddl but could not able to find a way to extract the ddl for all the database link and the coil in a file recreate them in the future?

    Tried searching on OTN but no luck, if someone shares how them spool or point me to a particular forum that will be great.

    Thank you

    We may also use something simple, select as below to extract the ddl

    Select dbms_metadata.get_ddl ('DB_LINK', db_link, owner) vSQL of

    dba_db_links

    /

  • How to list the columns for a view

    Dear experts

    I know how to list the columns in a table. This easy by querying the data USER_TAB_COLUMNS dictionary.

    But my problem is how to issue a query that returns the columns for a view?

    Thanks in advance

    USER_TAB_COLUMNS stores the metadata for both views.

    Select * from user_tab_columns where table_name = 'YOUR_VIEW_NAME"of order of column_id.    -Replace with your view_name (mandatory course)

    See you soon,.

    Manik.

  • How to generate the ddl for unlimited quota

    Hi all

    DB: Oracle 9.2.0.4
    OS: Solaris 8

    I have a 12 tablespaces and 18 users of the application.
    I would like to grant an unlimited quota for all users on all areas of storage, to find out how to generate the ddl script.

    ex: change the dataagent user quota unlimited on DSOM.

    can anyone help us.
    Thank you
    KK.

    All users in all areas of storage?

    Select "edit user" | user name | "quota unlimited on | nom_tablespace | ';'
    from dba_users cross join dba_tablespaces
    When not in dba_tablespaces.tablespace_name ('SYSTEM', "SYSAUX");

    Please, be careful with this

    HTH
    Antonio NAVARRO

  • Oracle UCM - how to display the reason for the rejection workflow

    I've created a workflow

    Contributor->->-> approval of HOD Reviewer2 Reviewer1

    If Reviewer1 Reviewer2 or approval of HOD "REJECT" the document that it redirected to the last step of the workflow. All rejection, they enter "reject the reason", but the reason for the rejection is not displayed to the user of most recent workflow.

    I need a solution to most come

    Thank you
    Deepak

    Please read the readme.txt file. It clearly states:

    ""If you wish, include display_reject_reason could be used to display the reason.". (i.e. it has not yet been added to any page)

    What you need to do is add a line

    <$include display_reject_reason$>
    

    somewhere in workflow_review_frames.htm (or find an inclusion where it can be added).

  • How to display the note for a cell of table with javascript?

    My goal is to do it with javascript. No manipulation of the side server.

    < af:table id = "t1" >
    < af:column id = "c1" >
    < af:outputText id = "ot1" >...
    < af:clientListner ...method="showpopup"/ >
    < /... >
    < /... >
    < /... >

    ....

    < af:popup id = "p1" >
    < af:noteWindow id = ot2 >
    here to show the value of ot1
    < /... >
    < /... >


    function showPopup (e) {}
    var text is e.getSource () .getValue ();.
    var popup is e.getSource (.findComponent("::p1"));.
    now, how to upgrade the content of the notewindow?
    Popup.Show ();
    }

    Hello

    You can try with something like that.

                   
                        
                    
    
                    
                        
                            
                        
    
                    
                    
                        function showPopup(evt){
                            var ot1 = AdfPage.PAGE.findComponent("ot1");
                            var text=ot1.getValue();
                            var popup=AdfPage.PAGE.findComponent("p1");
                            var ot2=AdfPage.PAGE.findComponent("ot2");
                            ot2.setValue(text);
                            popup.show();
    
                            }
    
                    
    

    Arun-

  • How to display the ToolTip for button

    Hello

    I use 11.1.1.4.

    I want to show the ToolTip in the button. tag that so I want to use and to display the ToolTip.

    Best regards, rami

    Rami,

    Use the property 'shortDesc"of the button.

    John

  • How to display the information for the account of the past...

    original title: old perental controll reports

    How to view information for a user account on my computer from the past? All I can shoot upwards is from today, when I walk them. I don't need any kind of detailed information just the password of the account and if it has been changed since its creation. It was only created a cpl months however. Please help lol!

    Hi Candy86,

    There is no way to recover old passwords the value on the computer, or the old parental control information.

  • How to display the Description for the selected instead of the ID value

    Hi I have a problem I want to display a description on a combo box list of values instead of the ID when I want to use ir to a formlayout or af:query for estethic

    because I found this link:

    http://vikasadflovdevelop-ADF-Lov.blogspot.com/2012/06/v-behaviorurldefaultvmlo.html?showComment=1389196282800

    https://blogs.Oracle.com/ADF/entry/combo_lov_how_to_display

    The Archives of the Incident: ADF: LOV Description instead of the code

    but none of them works really or I don't no how to make someone can helpme please

    I am new to ADF and jdeveloper

    Hello

    The below tutorial works very well, as I've used in several applications

    The Archives of the Incident: ADF: LOV Description instead of the code

    I guess that u missed a few steps. Just follow step by step as shown in the blog.

    Thank you

    Nitesh

  • Question: How to display the rating for the SURVEY

    Hello

    I use Lightroom for years. I like to use the mode of INQUIRY.  But today, I couldn't see the stars rating under each photo in the mode of inquiry; I don't see the status of the indicator.  Now, it's probably something I did, like hit a shortcut or something... but for the life of me, I can't understand how to bring this Visual information.  After searching online + fiddling around with the settings, I finally thought I'd come here and ask if anyone knows...

    Thank you!

    PS. Lightroom 4.3RC (why 4.3 RC, because I am one of these with a super slow Lightroom plagged in develop mode, especially with my D800 files!) I'm crossing my fingers with each update RC software is faster... )

    Look closely

  • find the ddl for all index

    Hello
    on the 11g on Win 2008 R2

    How to find the ddl for all index built on MY_VW?
    Thank you.

    You can use DBMS_METADATA for this:

    SELECT DBMS_METADATA.GET_DDL
           ( 'INDEX'
           , index_name
           , owner
           )
    FROM   all_indexes
    WHERE  table_name  = ''
    AND    table_owner = ''
    ;
    
  • Retrieve the DDL for temporary Table existing global

    HI: I'm on 10.2.0.3.

    Anyone know how to recover the DDL for TWG? For an ordinary table, I select dbms_metadata.get_ddl ('TABLE', '< table_name >', '< OWNER >') of double;

    Does not work for GTT! TIA.

    Can you elaborate a bit on "does not work"? Are you an Oracle error, for example? If so, what is the error?

    Seems to work for me on 10.2.0.1

    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    
    SQL> create global temporary table gtt_foo (
      2  col1 number
      3  );
    
    Table created.
    
    SQL> select object_type from user_objects
      2  where object_name = 'GTT_FOO';
    
    OBJECT_TYPE
    -------------------
    TABLE
    
    SQL> select dbms_metadata.get_ddl( 'TABLE', 'GTT_FOO' )
      2    from dual;
    
    DBMS_METADATA.GET_DDL('TABLE','GTT_FOO')
    -----------------------------------------------------------
    
      CREATE GLOBAL TEMPORARY TABLE "SCOTT"."GTT_FOO"
       (    "COL1" NUMBER
       ) ON C
    

    Justin

  • How to display the thumbnails in the default view

    How to display the thumbnails in the default view. I have just started a test of DC Acrobat and cannot find how to set the thumbnail view as default.

    Thanks George. Seems to only work for individual documents. If I do your instructions, close the document and then re - open, then of course the miniature view opens immediately. However, if I open another document the thumbnail view is not here. I need the thumbnail view to be opened by default for all documents as older versions of Adobe and other PDF software. If you can help that would be great.

  • How to display the value of the variable for bottom of pl/sql

    How to display the value of the variable for bottom of pl/sql

    declare

    V_1 number: = 10;

    V_2 number: = 20;

    V_3 number: = 30;

    v_4 number: = 40;

    v_5 number: = 50;

    test varchar2 (100);

    Start

    I'm in 1.5

    loop

    test: = "v_" | I have;

    dbms_output.put_line(i||) e > ' | test);

    end loop;

    end;

    /

    How to get below output:

    1 > v_1

    2 > v_2

    3 > v_3

    4 > v_4

    5 > v_5

    But I want to output of

    1 > 10

    2 > 20

    3 > 30

    4 > 40

    5 > 50

    Hello

    You cannot reference variables as you did and get the value of the variable. Use pretty collection.

    set serveroutput on size 2000
    declare
      type      number_table is table of number;
      numbers   number_table := number_table(10, 20, 30, 40, 50);
    begin
      for i in numbers.first .. numbers.last
      loop
        dbms_output.put_line(i || '->' || numbers(i));
      end loop;
    end;
    /
    
    anonymous block completed
    1->10
    2->20
    3->30
    4->40
    5->50
    

    See the Collections of PL/SQL and Records http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#LNPLS005

  • Install RMS 13.1 how to add limits given in the ddl for UK files?

    Hello gurus, the retail
    I installed RMS 13.1 without running the partition.ksh script during installation detail for RMS database and it has created some examples of data too, I saw the Guide installation and especially watched the stages of partitioning in the Guide, can someone give a hint, how the data limits are changed in the ddl for UK files? Since I'm a DBA, I'm a little confused, where to get this data? as the installation guide mentions that the RMS_partition_defintion.xls has modified and used for installation of production combined with partition_attributes.cfg for a production facility.
    Thanks in advance
    -Vivek

    Hi Vivek,
    Let's see...

    UK means United Kingdom of great brittain? I think that there is no UK specific DDL instructions associated with RMS.

    If you look at the Installer (unzip the zip to edelivery.oracle.com for example RMS 13.1), order folders

    V16908-01\rms_13.1_install\rms13dbschema\rms\dbschema\dbscripts_rms\examples\part
    V16908-01\rms_13.1_install\rms13dbschema\rms\dbschema\dbscripts_rms\ddl\part

    This package contains a ksh script which is driven by a script configuration and some lists of specific partitions in the data_def folder.
    This script partition.ksh can recreate DOF to other unpartitioned tables to partitioned.

    The XLS file mentioned also in this file and helps defining the number of partitions and make one or for example multidimensional (e.g. range/hash).

    The whole process is explained in a lot of details in the last chapter of the guide to implementation of goods merch-131 - impg.pdf.

    When your system already contains data, this should be saved and re-established.

    Note that indexes on partitioned tables may need too many partitioning, it takes at least some reflection on this and AFAIK the RMS installation program tries to respond to this also.

    Best regards
    Erik Ykema

    Published by: ErikYkema on October 29, 2010 08:05

Maybe you are looking for