It's not a secret anymore!*
The moose likes JDBC and the fly likes mysql simple  doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mysql simple  doubt " Watch "mysql simple  doubt " New topic
Author

mysql simple doubt

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055



http://www.lifesbizzare.blogspot.com || OCJP:81%
manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
It is defining precision level.

...better to google it first and then put your question on the forum.


love your job and not your company;
...because you never know when your company will stop loving you!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

Manoj, I think you got the wrong line. The line that is commented is defining a primary key for the table.


JBoss In Action
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

ya i know what primary key means but why did we write

constraint pk_e_no


before primary key
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30537
    
150

Vishal,
It is the name of the constraint used to enforce the primary key. Sometimes we have a naming convention and want to use a specific name.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
srinivas srinivasmeenavalli
Ranch Hand

Joined: Jul 13, 2008
Posts: 65
Primay key is one type of constraints.There should be a way to differentiate Primary keys in datbase.
For example if i have another table called Dept with a primary key.
if we don't specify primary key name in your table .there will be a conflict in database system.
think that database has a SQL parser to understand give SQL statements.
correct me if i am wrong.I have no idean in mysql.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mysql simple doubt