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

The table have next structure:

`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

Written By
Query have Null find by virtual column. Why?
September 11, 2016 04: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.