网络编程
位置:首页>> 网络编程>> 数据库>> mysql判断字段是否存在的方法

mysql判断字段是否存在的方法

  发布时间:2024-01-22 17:25:54 

标签:判断字段存在

1. desc 命令
格式: desc tablename columnname

例子:
desc `table` `mid`
desc `table` '%abc%'

2. show columns 命令
格式: show columns from tablename like columnname
例子:
show columns from `table` like 'mid'
show columns from `table` like '%abc%'

3. describe 命令
格式: describe tablename columnname
describe 相當于 show columns from
例子:
describe `table` `mid`

describe `table` '%abc%'

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com