Connect with your schema and run the sql scripts
SET LINESIZE 32000;
SET PAGESIZE 40000;
SET LONG 50000;
SELECT t.table_name,
t.column_name
FROM user_tab_columns t
WHERE t.nullable = 'Y'
AND t.num_distinct = 0 AND t.table_name='TABLE_NAME';
For example:
SET LINESIZE 32000;
SET PAGESIZE 40000;
SET LONG 50000;
SELECT t.table_name,
t.column_name
FROM user_tab_columns t
WHERE t.nullable = 'Y'
AND t.num_distinct = 0 AND t.table_name='SUBS';
Result:
TABLE_NAME COLUMN_NAME
------------------------------ ------------------------------
SUBS FINISH_REASON_ID
SUBS CONTRACT_VALID
SUBS PROMOTION_VALID
SUBS NOTES
SUBS FIRST_SHOP_CODE
SUBS FIRST_EXP_DATE
SUBS SECOND_EXP_DATE
SUBS PROM_VALID_DATETIME
SUBS LAST_USERNAME
SUBS PASSWORD
SUBS SECRET
SUBS EXPIRE_DATE
SUBS NATIONALITY
SUBS SELLING_PRICE
SUBS CENTER_CODE
SUBS ZONE_ID
SUBS ZONE_ADDRESS
SUBS ZONE_AREA_CODE
SUBS PRODUCT_ID
SUBS NUM_REFILLS
SUBS UPDATE_STATUS
SUBS CUST_TYPE
SUBS CONTACT_NAME
SUBS ZONE_CODE
SUBS NUM_CHANGE_METZONE
SUBS LAST_CHANGE_METZONE
SUBS AREA_CODE_ACTIVE
SUBS CELL_ID_ACTIVE
SUBS OLD_EMP_CODE
SUBS EMP_CODE_BK
SUBS FLAG
SUBS SERIAL_MACHINE
SUBS COUNT_UPDATE_INFOR
SUBS UPDATE_DATE
SUBS G_TYPE
SUBS TYPE_MACHINE
SUBS NUM_3G
SUBS SOURCE_TYPE
SUBS ID_ADDRESS
SUBS FAX
SUBS DATA
SUBS ID_NO
SUBS ID_ISSUE_PLACE
SUBS CONTRACT_NO
SUBS CONTRACT_TYPE
SUBS CONTRACT_DATE
SUBS REG_REASON_ID
SUBS PROM_PROGRAM_CODE1
SUBS PROM_PROGRAM_CODE2
49 rows selected
0 Comment to "How to select columns with null values"
Post a Comment