sqyog报错
报错提示:
There was error(s) while executing the queries .
The query and the error message has been logged at:
C:\Users\50800\AppData\Roaming\SQLyog\sqlyog.err.
Please click on “Open Error File…” to open the error file.
报错文件提示:
查询:
SELECT last_name , job_id , salary AS sal
FROM employees;
出错处:2020-03-21 19:25:05
行号:3
错误代码: 1146 - Table ‘girls.employees’ doesn’t exist查询:
SELECT last_name , job_id , salary AS sal
FROM employees;
出错处:2020-03-21 19:37:04
行号:3
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
语法:
select
查询列表
from
表名
where
筛选条件;
分类:
一、按条件表达式筛选
简单条件运算符:> < = != <> >= <=
二、按逻辑表达式筛选
逻辑运算符:
作用:用于连接条件表达式
&& || !
and or not
&&和and:两个条件都为true,结果为true,反之为false
||或or: 只要有一个条件为true,结果为true,反之为false
!或not: 如果连接的条件本身为false,结果为true,反之为false
三、模糊查询
like
between and
in
is null
*/
SELECT
*
FROM
employees
WHERE
salary>12000
出错处:2020-03-21 19:38:47
行号:43
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
语法:
select
查询列表
from
表名
where
筛选条件;
分类:
一、按条件表达式筛选
简单条件运算符:> < = != <> >= <=
二、按逻辑表达式筛选
逻辑运算符:
作用:用于连接条件表达式
&& || !
and or not
&&和and:两个条件都为true,结果为true,反之为false
||或or: 只要有一个条件为true,结果为true,反之为false
!或not: 如果连接的条件本身为false,结果为true,反之为false
三、模糊查询
like
between and
in
is null
*/
SELECT
*
FROM
employees
WHERE
salary>12000
出错处:2020-03-21 19:38:57
行号:43
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
department_id
FROM
employees
WHERE
department_id<>90
出错处:2020-03-21 19:38:57
行号:53
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
salary,
commission_pct
FROM
employees
WHERE
salary>=10000 AND salary<=20000;
出错处:2020-03-21 19:38:57
行号:66
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
*
FROM
employees
WHERE
NOT(department_id>=90 AND department_id<=110) OR salary>15000
出错处:2020-03-21 19:38:57
行号:73
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
like
between and
in
is null|is not null
/
/
特点:
①一般和通配符搭配使用
通配符:
% 任意多个字符,包含0个字符
_ 任意单个字符
、
select
*
from
employees
where
last_name like ‘%a%’;#abc
select
last_name,
salary
FROM
employees
WHERE
last_name LIKE ‘__n_l%’;
SELECT
last_name
FROM
employees
WHERE
last_name LIKE ‘_KaTeX parse error: Expected group after '_' at position 1: _̲%' ESCAPE '’;
/
①使用between and 可以提高语句的简洁度
②包含临界值
③两个临界值不要调换顺序
*/
SELECT
*
FROM
employees
WHERE
employee_id >= 120 AND employee_id<=100
出错处:2020-03-21 19:38:57
行号:137
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
*
FROM
employees
WHERE
employee_id BETWEEN 120 AND 100
出错处:2020-03-21 19:38:57
行号:144
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
含义:判断某字段的值是否属于in列表中的某一项
特点:
①使用in提高语句简洁度
②in列表的值类型必须一致或兼容
③in列表中不支持通配符
*/
SELECT
last_name,
job_id
FROM
employees
WHERE
job_id = ‘IT_PROT’ OR job_id = ‘AD_VP’ OR JOB_ID =‘AD_PRES’
出错处:2020-03-21 19:38:57
行号:164
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
job_id
FROM
employees
WHERE
job_id IN( ‘IT_PROT’ ,‘AD_VP’,‘AD_PRES’)
出错处:2020-03-21 19:38:57
行号:175
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
=或<>不能用于判断null值
is null或is not null 可以判断null值
*/
SELECT
last_name,
commission_pct
FROM
employees
WHERE
commission_pct IS NULL
出错处:2020-03-21 19:38:57
行号:194
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
commission_pct
FROM
employees
WHERE
commission_pct IS NOT NULL
出错处:2020-03-21 19:38:57
行号:204
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
commission_pct
FROM
employees
WHERE
salary IS 12000
出错处:2020-03-21 19:38:57
行号:214
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘12000’ at line 7查询:
SELECT
last_name,
commission_pct
FROM
employees
WHERE
commission_pct <=>NULL
出错处:2020-03-21 19:38:57
行号:227
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
salary
FROM
employees
WHERE
salary <=> 12000
出错处:2020-03-21 19:38:58
行号:238
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
IS NULL:仅仅可以判断NULL值,可读性较高,建议使用
<=> :既可以判断NULL值,又可以判断普通的数值,可读性较低
出错处:2020-03-21 19:38:58
行号:269
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IS NULL:仅仅可以判断NULL值,可读性较高,建议使用
<=> :既’ at line 1查询:
/*
语法:
select
查询列表
from
表名
where
筛选条件;
分类:
一、按条件表达式筛选
简单条件运算符:> < = != <> >= <=
二、按逻辑表达式筛选
逻辑运算符:
作用:用于连接条件表达式
&& || !
and or not
&&和and:两个条件都为true,结果为true,反之为false
||或or: 只要有一个条件为true,结果为true,反之为false
!或not: 如果连接的条件本身为false,结果为true,反之为false
三、模糊查询
like
between and
in
is null
*/
SELECT
*
FROM
employees
WHERE
salary>12000
出错处:2020-03-21 19:38:59
行号:43
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
department_id
FROM
employees
WHERE
department_id<>90
出错处:2020-03-21 19:38:59
行号:53
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
salary,
commission_pct
FROM
employees
WHERE
salary>=10000 AND salary<=20000
出错处:2020-03-21 19:38:59
行号:66
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
*
FROM
employees
WHERE
NOT(department_id>=90 AND department_id<=110) OR salary>15000
出错处:2020-03-21 19:38:59
行号:73
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
like
between and
in
is null|is not null
/
/
特点:
①一般和通配符搭配使用
通配符:
% 任意多个字符,包含0个字符
_ 任意单个字符
、
select
*
from
employees
where
last_name like ‘%a%’;#abc
select
last_name,
salary
FROM
employees
WHERE
last_name LIKE ‘__n_l%’;
SELECT
last_name
FROM
employees
WHERE
last_name LIKE ‘_KaTeX parse error: Expected group after '_' at position 1: _̲%' ESCAPE '’;
/
①使用between and 可以提高语句的简洁度
②包含临界值
③两个临界值不要调换顺序
*/
SELECT
*
FROM
employees
WHERE
employee_id >= 120 AND employee_id<=100
出错处:2020-03-21 19:38:59
行号:137
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
*
FROM
employees
WHERE
employee_id BETWEEN 120 AND 100
出错处:2020-03-21 19:38:59
行号:144
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
含义:判断某字段的值是否属于in列表中的某一项
特点:
①使用in提高语句简洁度
②in列表的值类型必须一致或兼容
③in列表中不支持通配符
*/
SELECT
last_name,
job_id
FROM
employees
WHERE
job_id = ‘IT_PROT’ OR job_id = ‘AD_VP’ OR JOB_ID =‘AD_PRES’
出错处:2020-03-21 19:38:59
行号:164
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
job_id
FROM
employees
WHERE
job_id IN( ‘IT_PROT’ ,‘AD_VP’,‘AD_PRES’)
出错处:2020-03-21 19:38:59
行号:175
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
/*
=或<>不能用于判断null值
is null或is not null 可以判断null值
*/
SELECT
last_name,
commission_pct
FROM
employees
WHERE
commission_pct IS NULL
出错处:2020-03-21 19:38:59
行号:194
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
commission_pct
FROM
employees
WHERE
commission_pct IS NOT NULL
出错处:2020-03-21 19:38:59
行号:204
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
commission_pct
FROM
employees
WHERE
salary IS 12000
出错处:2020-03-21 19:38:59
行号:214
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘12000’ at line 7查询:
SELECT
last_name,
commission_pct
FROM
employees
WHERE
commission_pct <=>NULL
出错处:2020-03-21 19:38:59
行号:227
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
SELECT
last_name,
salary
FROM
employees
WHERE
salary <=> 12000
出错处:2020-03-21 19:38:59
行号:238
错误代码: 1109 - Unknown table ‘employees’ in information_schema查询:
IS NULL:仅仅可以判断NULL值,可读性较高,建议使用
<=> :既可以判断NULL值,又可以判断普通的数值,可读性较低
出错处:2020-03-21 19:38:59
行号:269
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IS NULL:仅仅可以判断NULL值,可读性较高,建议使用
<=> :既’ at line 1查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 13:27:57
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 13:28:31
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 13:48:32
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 13:48:44
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 14:02:04
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 14:02:17
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 14:02:28
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3查询:
SELECT employee_id
,job_id
,last_name
FROM employees
ORDER BY department_id
DESC ,city
salary
出错处:2020-03-22 14:04:19
行号:6
错误代码: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘salary
’ at line 3
怎么解决