Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql simple doubt

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
manoj r patil
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is defining precision level.

...better to google it first and then put your question on the forum.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manoj, I think you got the wrong line. The line that is commented is defining a primary key for the table.
 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya i know what primary key means but why did we write

constraint pk_e_no


before primary key
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34672
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
srinivas srinivasmeenavalli
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic