jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases 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 and Relational Databases
Bookmark "mysql simple  doubt " Watch "mysql simple  doubt " New topic

mysql simple doubt

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1067

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

Joined: May 14, 2008
Posts: 5852

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

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

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, 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
It's not a secret anymore!