- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Display different variables in MySQL using LIKE?
Following is the syntax −
show variables where Variable_name like 'yourVariable1%' or Variable_name like 'yourVariable2%',.............N;
Let us implement the above syntax to show(more than one) variables −
mysql> show variables where Variable_name like 'key%' or Variable_name like 'innodb_undo%' or Variable_name like 'innodb_log%';
Output
+------------------------------------+----------+ | Variable_name | Value | +------------------------------------+----------+ | innodb_log_buffer_size | 1048576 | | innodb_log_checksums | ON | | innodb_log_compressed_pages | ON | | innodb_log_file_size | 50331648 | | innodb_log_files_in_group | 2 | | innodb_log_group_home_dir | .\ | | innodb_log_spin_cpu_abs_lwm | 80 | | innodb_log_spin_cpu_pct_hwm | 50 | | innodb_log_wait_for_flush_spin_hwm | 400 | | innodb_log_write_ahead_size | 8192 | | innodb_undo_directory | .\ | | innodb_undo_log_encrypt | OFF | | innodb_undo_log_truncate | ON | | innodb_undo_tablespaces | 2 | | key_buffer_size | 8388608 | | key_cache_age_threshold | 300 | | key_cache_block_size | 1024 | | key_cache_division_limit | 100 | | keyring_operations | ON | +------------------------------------+----------+ 19 rows in set (0.01 sec)
- Related Articles
- How to use user variables in MySQL LIKE clause?
- Use MySQL LIKE and NOT LIKE to display similar results?
- MySQL command for display current configuration variables?
- Display specific table names with MySQL LIKE Operator
- MySQL query to display records from a table filtered using LIKE with multiple words?
- Using User-Defined Variables in MySQL
- Using variables with MySQL prepare statement
- Using LIKE for two where clauses in MySQL?
- Using LIKE clause twice in a MySQL query
- Using Options to Set MySQL Program Variables
- Display multiple selected rows using MySQL IN()
- How can I achieve similar result like using a loop in MySQL WHERE clause to display only alternate ID records?
- How to select different values from same column and display them in different columns with MySQL?
- MySQL LIKE IN()?
- System variables vs Local Variables in MySQL?

Advertisements