LIKE predicate (binary)
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
                                        Binary LIKE predicates are the binary version of the LIKE predicate.
                                    
                                        With jOOQ, the binary LIKE predicate can be created from any column expression as such:
                                    
TITLE     LIKE CAST('%abc%' AS VARBINARY)
TITLE NOT LIKE '%abc%'
BOOK.TITLE.binaryLike("%abc%".getBytes())
BOOK.TITLE.notBinaryLike("%abc%".getBytes())
See LIKE predicate for a text version of this predicate.
Dialect support
This example using jOOQ:
BOOK.TITLE.binaryLike("%abc%".getBytes())
Translates to the following dialect specific expressions:
Aurora Postgres, Postgres, YugabyteDB
CAST(BOOK.TITLE AS bytea) LIKE CAST(E'\\045\\141\\142\\143\\045' AS bytea)
Databricks
CAST(BOOK.TITLE AS binary) LIKE X'2561626325'
ASE, Access, Aurora MySQL, BigQuery, ClickHouse, CockroachDB, DB2, DuckDB, Exasol, Firebird, H2, HSQLDB, Hana, Informix, MariaDB, MemSQL, MySQL, Oracle, Redshift, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Spanner, Sybase, Teradata, Trino, Vertica
/* UNSUPPORTED */
Generated with jOOQ 3.21. Support in older jOOQ versions may differ. Translate your own SQL on our website

 
        
Feedback
Do you have any feedback about this page? We'd love to hear it!