MYSQL基础问题 新建一个表table 字段有:字段1 字段2 字段3 字段4字段3里面我存的数据也是一张表 怎么存字段三的表已经建好 名字是table3 是修改字段3的数据类型吗? 默认的是varchar 应该改成什么????? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 举例说明要求insert into select ? 另建一个table3 表table表的 字段3设置为外键关联到table3表的id字段 table :主索引 字段1 字段2 字段3 字段4 id 姓名 性别 基本信息表 婚否 1 张三 男 table3 未婚 2 李四 女 table4 已婚table3:主索引 字段1 字段2 字段3 id 年龄 工作单位 家庭住址 1 20 某单位 某地 2 21 某单位 某地table4:和table3 类似 create table table1( id int not null primary key, name varchar(20) not null, t int, index(t), foreign key(id) references table2(id));create table table2( id int not null primary key, ...);关键:t int,index(t),foreign key(id) references table2(id) mysql数据库问题 数据库 我创建的调度器报语法错误大虾,帮忙看一下! mysql错误1045 求基础的查询语句 大家来帮我想想 请教高手。备份问题。 送数据表的进程管理,在线等答........... mysqldump错误 MySQL 响应时间 统计 phpMyAdmin中怎么给表增加外键 触发器造成的内容更新是否会被写入binlog从而能够被slave同步?
insert into select ?
table表的 字段3设置为外键关联到table3表的id字段
id 姓名 性别 基本信息表 婚否
1 张三 男 table3 未婚
2 李四 女 table4 已婚table3:主索引 字段1 字段2 字段3
id 年龄 工作单位 家庭住址
1 20 某单位 某地
2 21 某单位 某地table4:和table3 类似
create table table1(
id int not null primary key,
name varchar(20) not null,
t int,
index(t),
foreign key(id) references table2(id)
);create table table2(
id int not null primary key,
...
);关键:
t int,
index(t),
foreign key(id) references table2(id)