开发者

How to define empty polygon for spatial column in MySQL?

开发者 https://www.devze.com 2023-04-13 05:31 出处:网络
I\'m trying to create spatial开发者_JS百科 index over table column (bbox polygon default NULL) but get error: All parts of a SPATIAL index must be NOT NULL.

I'm trying to create spatial开发者_JS百科 index over table column (bbox polygon default NULL) but get error: All parts of a SPATIAL index must be NOT NULL.

Problem is that I supposed some rows would contain NULLs. The question is: is there a way to declare column with default empty polygon?


Just define the column NOT NULL and no default.

spatial columns have an implicit default of 'empty'.

Its unfortunate, because you get a warning on insert, saying there is no default value; but you cant have a explicit default value either.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号