I need to retrieve the columns from a hive table that must begin with uppercase letter and end with digit. I used this query
select * from tab1 where col1 like '[A-Z]%[0-9]';
But not able to retrieve the records ,getting only empty result.
rlike / regexp
select * from tab1 where col1 rlike '^[A-Z].*[0-9]$';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With