This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Identify not null columns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Identify not null columns" Watch "Identify not null columns" New topic

Identify not null columns

Kishan Kumar
Ranch Hand

Joined: Sep 26, 2000
Posts: 130
Is there is anyway we can identify columns with "not null" constraint in a given table.
Thanks for your time.

Regards,<BR>V. Kishan Kumar
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

public int isNullable(int column) throws SQLException
Indicates the nullability of values in the designated column.
column - the first column is 1, the second is 2, ...
the nullability status of the given column; one of columnNoNulls, columnNullable or columnNullableUnknown
SQLException - if a database access error occurs
[ July 30, 2002: Message edited by: Jamie Robertson ]
I agree. Here's the link:
subject: Identify not null columns
jQuery in Action, 3rd edition