This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes Writing Create table query in MS Access Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply 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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Writing Create table query in MS Access
 
Similar Threads
How to get generated primary key value?
Which OSS database servers support Unicode ?
Datasource JNDI Lookup in WSAD from standalone app
Composite like relationship - Mapping Question
how can we use where clause with insert query using preparedStatement?