我正在尝试操作此处找到的现有数据库https://github.com/SchadLucas/xbmcTweaks/blob/master/music.sql

但由于某些原因,MariaDB不喜欢语法,尽管根据文档似乎是正确的

Error
SQL query: Documentation


DROP VIEW IF EXISTS artistview
CREATE VIEW artistview AS
SELECT DISTINCT  
artist.idArtist AS idArtist,strArtist,strBorn,strFormed,artistinfo.strGenres,artistinfo.strMoods,artistinfo.strStyles,strInstruments,strBiography,strDied,strDisbanded,strYearsActive,artistinfo.strImage,strFanart 
FROM artist   
LEFT OUTER JOIN artistinfo ON    artist.idArtist = artistinfo.idArtist
JOIN album ON album.strArtists = artist.strArtist
MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CREATE VIEW artistview AS
SELECT DISTINCT  
artist.idArtist AS idArtist,strArt' at line 2

版本运行是:

  • 服务器:通过UNIX套接字的Localhost

  • 服务器类型:MariaDB

  • 服务器版本:5.5.37-MariaDB - 源代码分发

  • 协议版本:10

  • 用户:root @ localhost

  • 服务器字符集:UTF-8 Unicode(utf8)

我不是SQL专家,似乎无法找到出错的地方 . 有任何想法吗?