Ondřej Plátek Archive
PhD student@UFAL, Prague. LLM & TTS evaluation. Engineer. Researcher. Father.

Oracle cheat sheet

  1. List tables

    You should set the column width

    COL table_name FORMAT a30;
    COL table_type FORMAT a30;

    Show the tables

    SELECT * FROM cat;

  2. imple table with primary key

    CREATE TABLE test (keydate smallint NOT NULL, PRIMARY KEY (keydate));

  3. Show schema of a table
    desc advert_date;

  4. set autotrace traceonly explain