Utility method from David Hoover.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2258 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -438,6 +438,21 @@ public class JDBCUtil
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a string representation of the default value for the specified column in the
|
||||||
|
* specified table. This may be null.
|
||||||
|
*/
|
||||||
|
public static String getColumnDefaultValue (Connection conn, String table, String column)
|
||||||
|
throws SQLException
|
||||||
|
{
|
||||||
|
ResultSet rs = getColumnMetaData(conn, table, column);
|
||||||
|
try {
|
||||||
|
return rs.getString("COLUMN_DEF");
|
||||||
|
} finally {
|
||||||
|
rs.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a column (with name 'cname' and definition 'cdef') to the specified table.
|
* Adds a column (with name 'cname' and definition 'cdef') to the specified table.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user