mysql

21
May

cpanel恢复mysql

mysql -u usernqme -ppassword database < /home/uqqqqcom/xxx.sql

Tags:
2
Sep

drupal 多数据库切换并导入数据

require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
Tags:
22
Apr

MYSQL 嵌套查询

嵌套查询:

Tags:
16
Apr

sum 与 distinct 同时存在 mysql group

一、案例
如表table:
NAME PACKNO UNITPRICE
23
Mar

多表联合删除及优化

delete t1,t2 from vcms_mainfo as t1 left join vcms_article as t2 on t1.id=t2.aid where t2.aid>4000 and t2.aid<100000

Tags:
8
Jan

sql之left join、right join、inner join的区别

sql之left join、right join、inner join的区别转自http://www.cnblogs.com/pcjim/articles/799302.html

left join(左联接) 返回包括左表中的所有记录和右表中联结字段相等的记录
right join(右联接) 返回包括右表中的所有记录和左表中联结字段相等的记录

Tags:
26
Nov

mysql会用到的语句

1 批量替换表里的指定内容
UPDATE `node` SET `title`= replace( `title`, '公交线路', '邯郸公交线路' ) WHERE `title` LIKE '%公交线路%'

Tags:
Syndicate content