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

jdbc problem

sihani rani
Ranch Hand

Joined: Jun 22, 2010
Posts: 32

In mysql

1)i want to create table to store book detail,in this table id is primary key.

2)that id should be in character with integer (ex : ib21 , ir21 , op5 , th65)


then how do i create id column in table...what datatype can i use for id in table creation.



please reply me,
thanks in advance..
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 531

Use varchar...
Rahul Nair
Ranch Hand

Joined: Dec 01, 2007
Posts: 138

You may create the another column possibly with Long data type which is the primary key for the table and use the existing bookDetailId of data type varchar with Unique Key Constraints which stores the id according to your Char and Integer Concatenation Logic...

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdbc problem