Check if is column nullable in Oracle database

Michal Wrobel - Dataedo Team Michal Wrobel 2018-07-11

Table of Contents:


    Query below checks nullability attribute for the column of tables and views in specified schema.

    Query

    select 
       table_name, 
       column_name, 
       case nullable 
            when 'N' then 'not nullable'
            when 'Y' then 'is nullable'
        end as nullable    
    from all_tab_columns
    where owner = 'PUT SCHEMA NAME HERE'
    order by table_name, column_name;
    

    Columns

    • table_name - name of table
    • column_name - column name
    • nullable - nullability attribute for the column:
      • is nullable - is nullable
      • not nullable - is not nullable

    Rows

    • One row represents one column in the schema
    • Scope of rows: all columns in the schema
    • Ordered by table name, column name

    Sample results

    0
    There are no comments. Click here to write the first comment.

    By continuing to use our website, you consent to the use of cookies in accordance with our Privacy Policy (updated 28-04-2020).
    Accept