felix-cao / Blog

A little progress a day makes you a big success!
31 stars 4 forks source link

MySQL #171

Closed felix-cao closed 5 years ago

felix-cao commented 5 years ago
mysql> update `Article` set img=replace(img,'www.baidu.com','pic.baidu.com');

批量的将 Article 表中的 img 字段中含有 www.baidu.com 字符串 替换为 pic.baidu.com

查看表的结构

mysql> desc tableName

看你的 mysql 当前默认的存储引擎:

mysql> show variables like '%storage_engine%';

查看某个表用了什么引擎

mysql> show create table tableName;
mysql> show table status from fncftc_sql where name='fanwe_role' \G;