This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

long data type

 
padma patil
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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.

thanks,
padmashree
I wanted to assign
 
Mahesh Mamani
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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. http://java.sun.com/j2se/1.3/docs/api/java/sql/Timestamp.html

Thanks,
Hope It Helps

Mahesh
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic