Help Center/
GaussDB/
Developer Guide(Distributed_8.x)/
FAQs/
What wildcards are supported in GaussDB? How do I use them?
Updated on 2024-06-03 GMT+08:00
What wildcards are supported in GaussDB? How do I use them?
Answer: GaussDB supports the following three types of wildcards:
- %: indicates any number of characters, including 0. It is used in the LIKE and NOT LIKE statements.
- _: indicates a character, which is used in LIKE and NOT LIKE statements.
- *: indicates any number of characters, including 0. It is used in some meta-commands.
-- Use wildcards to indicate any number of characters and query the tbl_test table for the data that starts with col1 and ends with ab. gaussdb=# SELECT * FROM tbl_test WHERE col1 LIKE 'ab%'; -- Use a wildcard to query the data of any single character string starting with a and ending with b in the col1 column of the tbl_test table. gaussdb=# SELECT * FROM tbl_test WHERE col1 LIKE 'a_b'; -- Query all tables whose names start with tbl. gaussdb=# \dt tbl*
Parent topic: FAQs
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot