标签:mysql 命令
查询追加
mysql -h 10.177.154.44 -udbbakftp -pdbbakftp@123 -D db_crm_base -e ‘select * from t_kfenv‘ >> 2.txt
查看表大小
SELECT TABLE_NAME,DATA_LENGTH+INDEX_LENGTH,TABLE_ROWS FROM information_schema.tables WHERE TABLE_SCHEMA=‘db_crm_base‘ AND TABLE_NAME=‘t_chat‘;
查看表结构
desc t_db_list;
查看数据库大小
SELECT sum(DATA_LENGTH)+sum(INDEX_LENGTH) FROM information_schema.TABLES where TABLE_SCHEMA=‘db_crm_base‘;
查看字节
select count(FKFUin),count(FEnv) from t_kfenv;
查看最大字段
select max(FKFUin),max(FEnv) from t_kfenv;
看表结构设计
show create table t_kfenv;
删除一个字段
delete from t_kfenv where FKFUin=‘2355199677‘;
delete from t_tips where FKFUin=‘800001105‘ and FExtUin=‘1495118982‘;
删除里面一个字段
delete from t_db_list where master_ip in (‘10.223.129.208‘);
插入字段
insert into t_kfenv(FKFUin, FEmailName) values (‘2355199678‘, ‘2355199678‘);
insert into t_tips(FTipsID, FKFUin, FKFExt, FExtUin) values (‘1336‘, ‘938035831‘, ‘1001‘, ‘1495013557‘);
更新字段
UPDATE t_tips SET FKFUin = 2355199679 WHERE FKFUin= 2355199678;
update t_kfext set FKFUin = 938079027,FKFExt = 1049,FRoleID = 2 WHERE FKFUin= 938079027;
本文出自 “秋水无痕” 博客,谢绝转载!
标签:mysql 命令
原文地址:http://7456193.blog.51cto.com/7446193/1828147