When I execute this query, I get an error
Error: near line 63: near "(": syntax error
Code:
SELECT *
FROM EMP
WHERE SAL > 2000 AND LEFT(ENAME,1) <> 'A'
ORDER BY HIREDATE ASC;
What am I doing wrong? Is it because of the LEFT command?
LEFT(str, len)
-- returns the leftmost length characters from the string str.
SELECT LEFT('abcd', 3)
Output: abc
Or you can replace the left with this code:
SELECT *
FROM EMP
WHERE SAL > 2000 AND ENAME NOT LIKE 'A%'
ORDER BY HIREDATE ASC;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.