|
I do not understand string comparison. Why doesn't the following work: SELECT id, songname FROM songs WHERE songname = Empire ; All I get is: Empty set (0.00 sec) I know the string exists in the data_base_: In record 135 exists: Empire | | 135 | Do I have to use LIKE ? I want to match a string from one table with a string from another table so I can display the data from the matched record. select movietable.id, movietable.songname, songs.id, songs.songname FROM movietable, songs WHERE movietable.songname = songs.songname; Results: Empty set (0.19 sec) This doesn't work either select movietable.songname, movietable.ID, songs.songname, songs.id FROM movietable, songs WHERE movietable.songname = Empire ; Yet, I know that movietable.songname contains a song called Empire and movietable.songs also contains a song called Empire How do I match the two strings? Running Linux with MySQL-3.23.32-1.7
|