In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The following mainly brings you the introduction and usage of MySQL 5.7.7 JSON type. I hope that the introduction and usage of MySQL 5.7.7 JSON type can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.
Starting with MySQL 5.7.7, the JSON type is supported.
CREATE TABLE IF NOT EXISTS `spss`.`variable` (`name`VARCHAR) NOT NULL, `type` JSON NOT NULL, `width` INT NOT NULL, `decimals` INT NOT NULL, `label`NOT NULL, `values`JSON NOT NULL, `missing`JSON NOT NULL, `columns`INT NOT NULL, `align`ENUM ('Left',' Right', 'Center') NOT NULL, `feature` ENUM (' Scale', 'Ordinal',' Norminal') NOT NULL, `role`ENUM ('Input',' Target', 'Both',' None') 'Partation',' Split') NOT NULL, PRIMARY KEY (`name`) ENGINE = InnoDB Insert into variable values ('S1th,' {"Numeric": "8:0"}', 8, 0, 'your gender?','{"1": "male", "2": "female"}','{"Missing": "None"}', 8 Input') Insert into variable values ('S2values`,' {"Numeric": "8:0"}', 8,0, 'your actual age?','{}','{}', 'Input''); select * from variable where JSON_Extract (`values`,'$. "1") = 'male'; select * from variable where `values`->'$. "1'= 'male'; select * from variable where measure = 'male'
A few points to note:
The use of the ENUM type.
The use of the JSON type.
In the JSON type, if the keyword is a number:'{"1": "male", "2": "female"}', enclose the number in double quotes when querying: `values`->'$. "1"'
When the column name is the SQL keyword, wrap the column name with the character "`", such as `values` in the example above.
For the above introduction and usage of MySQL 5.7.7 JSON type, do you find it very helpful? If you need to know more, please continue to follow our industry information. I'm sure you'll like it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.