aspose file tools*
The moose likes JDBC and the fly likes Writing Create table query in MS Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Writing Create table query in MS Access" Watch "Writing Create table query in MS Access" New topic
Author

Writing Create table query in MS Access

Mrutyunjay Hanchinal
Ranch Hand

Joined: Sep 26, 2001
Posts: 50
Hi All,
I need to create table from my Java code.
I need to specify default value to a column as 0.
If I specify with default keword as in Oracle it gives Syntax Error..
How do I do that?
Thanks
Mrutyunjay
Michael Zalewski
Ranch Hand

Joined: Apr 23, 2002
Posts: 168
You don't. (Or, you change your URL to point to an Oracle database).
AFAIK, there is no way to set the default value (or even to retrieve the default from SQL) for a column. Nor is there a way to set the format, or to retrieve the help text/description associated with the column. Access has its limitations.
Michael Zalewski
Ranch Hand

Joined: Apr 23, 2002
Posts: 168
In fact... I didn't think the default you set for a column in Access had any effect on INSERT done over ODBC or JDBC. Someone correct me if I am rong.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Writing Create table query in MS Access