Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

create table in mysql mariadb primary key foreign key

CREATE TABLE IF NOT EXISTS `scores` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  UserId int(11) NOT NULL,
  `NICKNAME` varchar(50) NOT NULL,
  `HIGHSCORE` int(11) NOT NULL,
  PRIMARY KEY (`ID`),
  FOREIGN KEY (UserId) REFERENCES USER(Id)
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #table #mysql #mariadb #primary #key #foreign #key
ADD COMMENT
Topic
Name
1+8 =