Vicky3D Vicky3D - 7 months ago 31
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.


You can run this query

Select DATA_DEFAULT from USER_TAB_COLUMNS where TABLE_NAME ='MyTable' and COLUMN_NAME = 'MyColumn'