Vicky3D Vicky3D - 1 year ago 62
Java Question

ResultSetMetaData getting defult value of column

I am Using Oracle database.

I want to get default value assign to column using Java JDBC.

But using

does not provide any method to get default value of column.

So please tell me any idea.
Thanks in advance.

Answer Source

You can run this query

Select DATA_DEFAULT from USER_TAB_COLUMNS where TABLE_NAME ='MyTable' and COLUMN_NAME = 'MyColumn'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download