Reputation: 153
What' the error with this syntax?
SELECT empno, sal*.075, ROUND(sal*.075, 2) bonus FROM emp WHERE ename LIKE ‘%A%’;
The sql statement which gives no error is the one written below.
SELECT empno, sal*.075, ROUND(sal*.075, 2) bonus FROM emp WHERE ename LIKE '%A%';
Upvotes: 2
Views: 2070
Reputation: 3777
You have used ‘%A%’
. SQL doesn't accept this character - this should be '%A%'
.
I could not find this in my keyboard.
Upvotes: 0
Reputation: 2938
Problem with the 1st is the single quote. SQL
doesn't accept that quote. I dont find the one in my keyboard. May be you copied the query from somewhere.
Upvotes: 0
Reputation: 238296
‘%A%’;
v.s.
'%A%';
The first has fancy '
characters. The usual cause for that is Outlook's AutoCorrect.
Upvotes: 5