Re: world_x
Hi,
When creating the table for CountryInfo the world_x script mimics what createCollection() methods does underneath.
CREATE TABLE `CountryInfo` (
`doc` json DEFAULT NULL,
`_id` varchar(32) GENERATED ALWAYS AS (json_unquote(json_extract(doc, '$._id'))) STORED PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
If you want to create the collection manually via SQL, you need your table structure to be exactly the same (meaning the same field names and types).
Still the preferred way would be just use createCollection() if possible.
--
Regards,
Andrzej Religa
MySQL Developer Tools
Subject
Views
Written By
Posted
1401
August 25, 2016 03:51AM
Re: world_x
946
August 26, 2016 05:51AM
949
August 26, 2016 08:43AM
896
August 26, 2016 01:18PM
840
August 28, 2016 04:24AM
787
August 28, 2016 08:45AM
822
August 28, 2016 10:40AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.