1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| SELECT PASSWORD('mypass'); #生成的密码值
SHOW STATUS; SHOW STATUS LIKE 'Table%';
SHOW VARIABLES; SHOW VARIABLES LIKE 'datadir'; SHOW VARIABLES LIKE 'have_symlink'; SHOW VARIABLES LIKE 'host_cache_size';
SET GLOBAL host_cache_size=300;
SELECT 'hello', '"hello"', '""hello""', 'hel''lo', '\'hello'; SELECT "hello", "'hello'", "''hello''", "hel""lo", "\"hello";
SET @t1=1, @t2=2, @t3:=4; #赋值 SELECT @t1, @t2, @t3, @t4 := @t1+@t2+@t3;
SET NAMES 'utf8'; SHOW CHARACTER SET; USE test; SELECT @@character_set_database, @@collation_database;
SELECT USER();
|