Computer >> 컴퓨터 >  >> 프로그램 작성 >> MySQL

LIKE를 사용하여 MySQL에서 다른 변수를 표시하시겠습니까?

<시간/>

다음은 구문입니다 -

show variables where Variable_name like 'yourVariable1%' or Variable_name like 'yourVariable2%',.............N;

(둘 이상) 변수를 표시하기 위해 위의 구문을 구현합시다 -

mysql> show variables where Variable_name like 'key%' or Variable_name like 'innodb_undo%' or Variable_name like 'innodb_log%';

출력

+------------------------------------+----------+
| 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)