• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

would you Give me this command ?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I have a database called LigaDB (I'm using MySQL 4.0)
I want to create the following table :

Player_Team filed in PLAYER_TABLE is the FK which refernce to Team_Name in TEAM_TABLE
I'm not an expert in SQL, so may I ask you to supply me the command that I should use in order to create the tables ?
the most important thing that I need is specifying the FK constraint in the command....
thanks.
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should really start to familiarize yourself with the basics of SQL, especially when all the information is at your fingertips for free!

Note: you didn't specify any types (there are several from which to choose for number columns). Also, you have a surrogate key for Player but not for Team; why?Wow, I must say that the MySQL online SQL Reference blows away Oracle's in terms of succintness and ease-of-reference.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, that's a beautiful site and always my first point of call for MySQL problems!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic