Query have Null find by virtual column. Why?
The table have next structure:
CREATE TABLE `test` (
`emp_no` int(11) NOT NULL,
`data` json NOT NULL,
`name` varchar(30) GENERATED ALWAYS AS (json_extract(`data`,'$.first_name')) VIRTUAL,
PRIMARY KEY (`emp_no`)
)
I'm querying and mysql return the 45 rows:
SELECT `emp_no`, name FROM test
WHERE json_extract(`data`,'$.first_name')='Parto'
But, if I make query:
SELECT `emp_no`,name FROM test
WHERE name ='Parto'
I have empty set (0 row)
Why i have empty rowset?
Subject
Views
Written By
Posted
Query have Null find by virtual column. Why?
1639
September 11, 2016 04:26AM
876
December 02, 2016 12:26AM
Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
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.