表名:customer_datails
customer_id customer_name
101 Hari prasad
102 Hari
103 prasad
104 Vara Prasad
105 Sri Hari bandaru
106 Raja Shekhara Prasad
我有上表。我想显示 CUSTOMER_ID'S WHO ARE HAVING NAME AS 'Hari' 和 'prasad' 。但我需要它与没有和条件的'REGEXP'。我尝试了以下那些正在工作的查询。
例 1)
select cistomer_id from customer_details where customer_name LIKE 'Raja' 'Prasad';
o/p: 106
例 2)
select cistomer_id from customer_details where customer_name LIKE 'Raja' AND
customer_name LIKE 'Prasad';
O/P: 106.
我需要上面没有“and”条件的正则表达式查询(意味着我不想在像Ex2这样的条件下多次使用customer_name字段)