摘要: # mysql函数 #### 1、字符串函数 concat(s1,s2,s3)拼接 lower(s)转小写 upper(s)转大写 lpad (str,n,pad)左填充,用Pad对str左填充,达到n个长度 rpad (str,n,pad)右填充,用Pad对str右填充,达到n个长度 trim(s 阅读全文
posted @ 2023-08-30 21:39 迭起兴衰 阅读(27) 评论(0) 推荐(0)
摘要: # DCL #### 1、管理用户 1、查询用户 use mysql; ​ select *from user; 2、create user '用名'@主机名 identified by 密码 ;创建用户 3、 alter user '用户名'@‘主机名’ identified with mysql 阅读全文
posted @ 2023-08-30 21:22 迭起兴衰 阅读(109) 评论(0) 推荐(0)
摘要: # DQL #### 1、基础查询 1、select 字段1,字段2,... from 表名; ​ select * from 表名;查询多个字段 2、select 字段1[as 别名1]... from 表名;设置别名 3、select distinct 字段列表 from 表名; 去除重复记录 阅读全文
posted @ 2023-08-30 20:18 迭起兴衰 阅读(132) 评论(0) 推荐(0)