create or replace view v_name
as
select t1.*,t2.*,t3.*
from A表 t1, B表 t2, C表 t3
where t1.a=t2.b and t2.b1=t3.c
CREATE TABLE `aa_user` (
`id` int(10) NOT NULL,
`name` varchar(10) DEFAULT NULL,
`age` int(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `aa_user` VALUES ('1', 'zs', '18');
INSERT INTO `aa_user` VALUES ('2', 'ls', '20');
INSERT INTO `aa_user` VALUES ('3', 'ww', '19');
CREATE TABLE `tb` (
`id` int(10) NOT NULL,
`fid` int(10) DEFAULT NULL,
`cc` int(10) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `tb` VALUES ('1', '1', '60');
INSERT INTO `tb` VALUES ('2', '1', '70');
INSERT INTO `tb` VALUES ('3', '2', '80');
INSERT INTO `tb` VALUES ('4', '2', '90');
CREATE or REPLACE view aa_ta_view AS
select a.*,b.fid,b.cc from aa_user a,tb b
where a.id = b.fid;