开发者

How to define empty polygon for spatial column in MySQL?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜