This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
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

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mysql simple  doubt " Watch "mysql simple  doubt " New topic

mysql simple doubt

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056 || 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

Joined: May 14, 2008
Posts: 5845

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: 1056

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

constraint pk_e_no

before primary key
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31052

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:
subject: mysql simple doubt