有人可以幫助我我有2個MySQL查詢,當我嘗試運行它們時會得到未知的列ID。我想補充一點,我從2005年的SQLServer將這個數據庫MySQL和他們在SQL Server 2005中MySQL查詢中的未知列ID
這裏是他們的1運行良好:
SELECT DISTINCT g.id AS `genre`
FROM media_playlist_sequence MPS
INNER JOIN media M ON M.`key` = MPS.media_key
INNER JOIN media_playlists MP ON MP.`key` = MPS.playlist_key
INNER JOIN node_media_playlist NMP ON NMP.playlist_key = MP.`key`
INNER JOIN nodes N ON N.`key` = NMP.node_key
INNER JOIN media_files MF ON MF.media_key = M.`key`
INNER JOIN media_locations ML ON ML.media_file_key = MF.media_file_key
AND ML.node_key = n.`key`
INNER JOIN media_genres MG ON MG.media_key = M.`key`
INNER JOIN genres G ON G.`key` = MG.genre_key
WHERE M.is_ready = 1
AND MP.id = 'Channels'
AND N.id = 'VIC-WIN7'
AND mf.is_quad_image = 0
查詢中的三個相關表('media_playlists','genres','nodes')是否存在'id'列? –
沒有'id'專欄,因爲它是這樣說的。 – MahanGM
id列在media_playlists,流派和節點中確實存在,這就是我困惑的原因。 – vic