0

Why does this code not work?: (If I remove book_info and author in the 'where' clause, it still doesn't work).

SELECT title, last_name 
FROM book_info NATURAL JOIN book_author natural join author
WHERE book_info.title = ‘Uncle Samsonite’ AND author.last_name = ‘Shakespeare’;

The error message I get is:

ERROR: syntax error at or near "Samsonite’"
LINE 3: WHERE book_info.title = ‘Uncle Samsonite’ AND author.last_na...

Without the 'where' clause it looks like this: Picture

user1
  • 37
  • 6
  • 2
    are you using a back-tick instead of a single quote? ' vs ` – John Boker Nov 10 '21 at 19:37
  • I'm using a single quote: ' not `@John – user1 Nov 10 '21 at 19:39
  • If you pasted your code in here it looks like it's using an apostrophe ‘ not a single quote '. what editor are you using? I've noticed when writing things on a mac in textedit or in the slack input it will change what i type to something else. – John Boker Nov 10 '21 at 19:45
  • Thank you so much, it worked!! Once you go Mac, you always go back @John – user1 Nov 10 '21 at 19:51

0 Answers0