首页 > 代码库 > 内连接环境
内连接环境
mysql> CREATE TABLE fruits -> ( -> f_id char(10) NOT NULL, -> s_id int NOT NULL, -> f_name char(255) NOT NULL, -> f_price decimal(8,2) NOT NULL, -> PRIMARY KEY(f_id) -> ); mysql> INSERT INTO fruits(f_id, s_id, f_name, f_price) VALUES -> (‘a1‘, 101, ‘apple‘, 5.2), -> (‘b1‘, 101, ‘blackberry‘, 10.2), -> (‘bs1‘, 102, ‘orange‘, 11.2), -> (‘bs2‘, 105, ‘melon‘, 8.2), -> (‘t1‘, 102, ‘banana‘, 10.3), -> (‘t2‘, 102, ‘grape‘, 5.3), -> (‘o2‘, 103, ‘coconut‘, 9.2), -> (‘c0‘, 101, ‘cherry‘, 3.2), -> (‘a2‘, 103, ‘apricot‘, 2.2), -> (‘l2‘, 104, ‘lemon‘, 6.4), -> (‘b2‘, 104, ‘berry‘, 7.6), -> (‘m1‘, 106, ‘mango‘, 15.7), -> (‘m2‘, 105, ‘xbabay‘, 2.6), -> (‘t4‘, 107, ‘xbababa‘, 3.6), -> (‘m3‘, 105, ‘xxtt‘, 11.6), -> (‘b5‘, 107, ‘xxxx‘, 3.6);
mysql> CREATE TABLE suppliers -> ( -> s_id int NOT NULL AUTO_INCREMENT, -> s_name char(50) NOT NULL, -> s_city char(50) NULL, -> s_zip char(10) NULL, -> s_call char(50) NOT NULL, -> PRIMARY KEY (s_id) -> );mysql> INSERT INTO suppliers(s_id, s_name, s_city, s_zip, s_call) VALUES -> (101, ‘FastFruit Inc.‘, ‘Tianjin‘, ‘300000‘, ‘48075‘), -> (102, ‘LT Supplies‘, ‘Chongqing‘, ‘400000‘, ‘44333‘), -> (103, ‘ACME‘, ‘Shanghai‘, ‘200000‘, ‘90046‘), -> (104, ‘FNK Inc.‘, ‘Zhongshan‘, ‘528437‘, ‘11111‘), -> (105, ‘Good Set‘, ‘Taiyuang‘, ‘030000‘, ‘22222‘), -> (106, ‘Just Eat Ours‘, ‘Beijing‘, ‘010‘, ‘45678‘), -> (107, ‘DK Inc.‘, ‘Zhengzhou‘, ‘450000‘, ‘33332‘);
内连接环境
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。