MySQL Query中的未知列ID

时间:2012-12-21 16:42:21

标签: mysql

有人可以帮助我当我尝试运行它时,我有2个MySQL查询得到未知的列ID。我可能会补充说我正在将这个数据库从SQLServer 2005转换为MySQL,它们在SQL Server 2005中运行良好。

其中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 

1 个答案:

答案 0 :(得分:1)

我的猜测是这是一个区分大小写的问题。 MySQL默认情况下区分大小写,而SQL Server则不区分大小写。