my sql 语句杂记

 

记录日常用过的sql语句。

很多sql语句,时间久了不太记得 语法 和用法。

平时 sql 语句也不是经常使用,所以在这里把日常使用过的mysql 语句记录下来,以备日后查看。

 

复制代码
#在终端连接 mysql 数据库
#mysql -h hostIp  -u username  -p  password
mysql -h rm-bp1n852bj848xb286.mysql.rds.aliyuncs.com -u hq_oem_user -p BH0Vf23gBv5wI
 
use db_smart_assit;
 
show tables;
 
select * from t_msg limit 1;
 
select * from t_msg where sub_module_type=31 ;
复制代码

 

 

复制代码
#找到数据库 
use db_hq_price_alarm_gnn;

#多少用户创建了预警
select count( distinct uid) as uidNum from t_user_alarm_rules;


# 一共多少条预警
select count(*) as AlarmNum from t_user_alarm_rules;
复制代码

 

复制代码


use db_hq_price_alarm_gnn;
select * from t_user_alarm_rules
where uid="cshxj1 ";


use db_hq_price_alarm_gnn;
select * from t_user_info
where uid="cshxj1 ";


use db_hq_price_alarm_gnn;
select * from t_alarm_template
where type="5" order by alarmType ASC;



use db_hq_price_alarm_gnn;
select * from t_alarm_history
where uid="cshxj1";

 
复制代码

 

复制代码
###修改预警模板
use db_hq_price_alarm_gnn;

update t_alarm_template 
set content = CONCAT(content , " 盘中信号实时变化,仅作为预警参考,请以盘后信号为准。")
where msg_type_name= "智能信号" and type=3;

select *  from t_alarm_template 
where  msg_type_name="智能信号";
复制代码

 

posted @   He_LiangLiang  阅读(46)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示