我刚开始学习SQL。当我写这段代码时
create database tutorial_1;
use tutorial_1;
create table tutorial
(
id int primary key,
name varchar(40),
duration decimal(4,2),
date date
);
insert into tutorial(id, name, duration, date)
values(1, 'c', 23.12, '2014-02-10');
insert into tutorial
values(2, 'python', 12.45, '2014-02-11');
insert into tutorial
values(3, 'sql', 34.17, '2014-02-14');
create database tutorial_2;
use tutorial_2;
create table tutorial_info
(
tutorial_id int primary key,
views int(40),
likes int(40),
dislikes int(40),
shares int(40)
);
insert into tutorial_info(tutorial_id, views, likes, dislikes, shares)
values (1, 23411, 124, 12, 19);
insert into tutorial_info(tutorial_id, views, likes, dislikes, shares)
values (2, 29019, 920, 100, 234);
insert into tutorial_info
values (3, 9019, 129, 23, 8);
insert into tutorial_info
SELECT t.id, t.name,
ti.views, ti.likes, ti.dislikes, ti.shares
FROM tutorial AS t
JOIN tutorial_info AS ti
ON t.id=ti.tutorial_id;
在 SQL 文件上,操作输出显示:
错误代码:1146。表 'tutorial_2.tutorial' 不存在 0.000 秒
但是当我检查 SCHEMAS 上的表格时,我找到了那个表格。我该怎么做才能修复它?