2015-04-21 310 views
2

如何設置點列的默認值在MySQL表設置默認值

我試圖

`location` POINT NULL DEFAULT POINT(7.0, 81.0), 

而是給出了一個錯誤

ERROR: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'POINT(7.0, 81.0),

如何設置默認值到點列

回答

2

類型爲POINT的列不能有默認值。如果您運行create table x(位置POINT not null DEFAULT 7.0, 81.0),你會看到消息

BLOB/TEXT column 'location' can't have a default value

你可以參考this page

+0

感謝reply.Is那裏this.I任何參考

發現 HTTP:// WWW .informit.com/articles/article.aspx?p = 1238838&seqNum = 2 寫於2008 – user2473015

+2

@ user2473015查看我的更新回答 – Jens

+0

感謝朋友的更新 – user2473015