mysql查詢表中的字段 相關命令 (22講)

2021-09-11 19:51:20 字數 594 閱讀 7078

#高階一:基礎查詢

/*語法:

select 查詢列表

from 表名;

類似於:system.out.println(列印東西)

特點:1,查詢列表可以是:表中的字段,表示式,函式

2,查詢的結果是乙個虛擬的**

*/#開啟所在的庫

use myemployees;

#1.查詢表中的單個字段

select last_name from employees;

#2.查詢表中的多個字段

select last_name,salary,email from employees;

#3.查詢表中的所有字段

select employee_id,first_name from employees;

select * from employees;

#4,查詢常量值

select 100;

select 'john';

#5,查詢表示式

select 100%98;

#6,查詢函式

select version();

MySQL中 如何查詢表名中包含某字段的表

select table name from information schema.tables where table schema tablename and table type base table and table name like copy information schema 是m...

MySQL中 如何查詢表名中包含某字段的表

select table name from information schema.tables where table schema tablename and table type base table and table name like copy information schema 是m...

MySQL中 如何查詢表名中包含某字段的表

select table name from information schema.tables where table schema tablename and table type base table and table name like copy information schema 是m...