MariaDB语法错误1064,请查看与MariaDB服务器版本对应的手册

时间:2014-06-02 07:35:09

标签: sql mariadb

我正在尝试操作此处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专家,似乎无法找到出错的地方。 有什么想法吗?

0 个答案:

没有答案