Skip to content
Advertisement

HIVE SQL: Select rows whose values contain string in a column

I want to select rows whose values contain a string in a column.
For example, I want to select all rows whose values contain a string '123' in the column 'app'.
table:

result:

I am not familiar with SQL query.
Could anyone help me? .
Thanks in advances.

Advertisement

Answer

In a number of ways:

like:

rlike:

instr:

locate:

Invent your own way.

Read manual: String Functions and Operators.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement