Vicky3D Vicky3D - 5 months ago 70
Java Question

ResultSetMetaData getting default 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'