File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes long data type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "long data type" Watch "long data type" New topic

long data type

padma patil
Ranch Hand

Joined: Nov 06, 2001
Posts: 41
I am generating unique id as
long id= System.currentTimeMillis();
I wanted to store this value into MySql table.
But Mysql doesn't support long datatype.
If I convert Long to int then it will truncate the extra part.
What shall I do? I need to generate unique id and add it to table.

I wanted to assign
Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
MySql has a Timestamp data-type which can be used for your purpose. U can use the Timestamp data-type in Java for this...
Use this URL for ref.

Hope It Helps

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: long data type