Query have Null find by virtual column. Why?
Posted by: Alexandre Kalendarev
Date: September 11, 2016 04:26AM

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?

Options: ReplyQuote


Subject
Views
Written By
Posted
Query have Null find by virtual column. Why?
1255
September 11, 2016 04:26AM


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.