Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mariadb add foreign key

alter table group_a 
add constraint fk_b_in_a
foreign key(`b_id`) 
    references group_b(`b_id`)
    on delete set null
    on update set null;
Comment

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)
);
Comment

alter table add foreign key mariadb example

alter table caixa add foreign key (idcaixafluxo) references caixafluxo (idcaixafluxo);
Comment

PREVIOUS NEXT
Code Example
Sql :: insert in to table sql 
Sql :: sql server convert to guid 
Sql :: uppercase sql 
Sql :: mysql loop 
Sql :: how to find unique key in sql 
Sql :: move table to a different schema 
Sql :: create table with timestamp postgresql 
Sql :: mysql select row max date 
Sql :: oracle session statistics 
Sql :: full join sql 
Sql :: mysql add columns 
Sql :: exec procedure oracle 
Sql :: Using GROUP BY in MySQL Join Table 
Sql :: mysql table schema 
Sql :: select last n rows mysql 
Sql :: mysql Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: oracle group 
Sql :: truncate psql 
Sql :: sql delete 
Sql :: mysql get max value and id 
Sql :: postgresql backup and restore globals and data 
Sql :: sql alter column name sql server 
Sql :: postgres delete by id 
Sql :: postgresql delete all content 
Sql :: bigquery current time 
Sql :: mysql:5.6 syntax create table 
Sql :: best sql collation 
Sql :: how to comment in sql 
Sql :: how to execute MySQL Stored Procedure in Python 
Sql :: count weekend days between two dates sql 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =