what does the query select * from table_abc where column_xyz like '%oracle%'
-
selects all the rows from the table having the column_xyz value starting with the word oracle
-
selects all the rows from the table having the column_xyz value ending with the word oracle
-
selects all the rows from the table having the column_xyz value containing the word oracle
-
selects all the rows from the table having the column_xyz value not containing the word oracle
The % wildcard matches any sequence of characters (including zero characters). '%oracle%' means match any value that contains 'oracle' anywhere - before, after, or in between. It would match 'My oracle database', 'oracle', or '123oracle456'.
The LIKE '%oracle%' pattern uses the % wildcard on both sides of the search term, which matches any value that contains 'oracle' anywhere within it — at the start, middle, or end. A pattern anchored only at the start (oracle%) or end (%oracle) would restrict matches to those positions specifically, but with wildcards on both sides, the match is purely on containment.