create table Users(
id float(6) primary key,
username VARCHAR(20),
foreign key(id) references Emps(id));
/*inserting records into users table*/
insert into Users (id) select Employee_Id from emps limit 5;
select * from users;/*selecting records from users table*/
问题是
create table Users( id float(6) primary key, username VARCHAR(20), foreign key(id) references Emps(id)); MySQL said: Documentation
#1005 - 无法创建表
Midterm
。Users
(errno: 150 "外键约束格式不正确")