mysql排序后显示排序序号
摘要:轉自:https://www.cnblogs.com/xiaowangxiao/p/11393265.html 网上找的一个比较齐全的解释案例,拿来记录一下 ① := 与 = 的区别 := 赋值的意思。在set update select 中表示赋值的意思,用的比较少一般都用=,但是在用变量实现行号
阅读全文
posted @
2021-06-29 17:32
Sharpest
编辑
MYSQL中按照季度、月份等分组
摘要:转自:https://www.freesion.com/article/1415317089/ mysql中关于分组的使用 select DATE_FORMAT(create_time,'%Y%u') weeks,count(caseid) count from tc_case group by w
阅读全文
posted @
2021-06-29 17:23
Sharpest
编辑
MySql多表关联Update笔记
摘要:转自:https://www.netingcn.com/mysql-update-table-join.html 对单表执行更新没有什么好说的,无非就是update table_name set col1 = xx,col2 = yy where col = zz,主要就是where条件的设置。有时
阅读全文
posted @
2021-06-29 17:19
Sharpest
编辑
MySQL运行SQL文件时(全面,改成time):check the manual that corresponds to your MySQL server version for the righ
摘要:转自:https://blog.csdn.net/qq_41042595/article/details/88591028 Mysql错误:check the manual that corresponds to your MySQL server version for the right syn
阅读全文
posted @
2021-06-29 17:15
Sharpest
编辑
mysql:there can be only one auto column...
摘要:转自:https://blog.csdn.net/gao_zhennan/article/details/79099940 一,问题发生今天(18/1/18),我在尝试删除一个定义为auto_increment的主键时(所用语句:alter table testdrop primary key)结果
阅读全文
posted @
2021-06-29 17:09
Sharpest
编辑
MySQL date()函数
摘要:转自:https://www.yiibai.com/mysql/mysql_function_date.html DATE(expr) 提取日期或日期时间表达式expr中的日期部分。 mysql> SELECT DATE('2003-12-31 01:02:03'); + + | DATE('200
阅读全文
posted @
2020-09-22 18:31
Sharpest
编辑
MySQL replace()函数
摘要:转自:https://www.yiibai.com/mysql/mysql_function_replace.html REPLACE(str,from_str,to_str) 返回字符串 str 中所有出现的 from_str 均被字符串to_str 替换后的字符串。 REPLACE()搜索 fr
阅读全文
posted @
2020-09-22 02:41
Sharpest
编辑
mysql字符串函数:locate()使用方法详解
摘要:转自:https://www.fujieace.com/mysql/functions/locate.html 语法 一: LOCATE(substr,str) 返回字符串substr中第一次出现子字符串的位置 str。 语法二: LOCATE(substr,str,pos) 返回字符串substr
阅读全文
posted @
2020-09-22 02:34
Sharpest
编辑
MySQL中TIMESTAMPDIFF和TIMESTAMPADD函数的用法(转)
摘要:转自:https://www.iteye.com/blog/wellkingsen-2018265 转载自:http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece763105392230e54f73d678b975f2482c25f93130a
阅读全文
posted @
2020-09-22 02:27
Sharpest
编辑
MySQL year()函数
摘要:转自:https://blog.csdn.net/moakun/article/details/82528829 MySQL YEAR函数简介 YEAR()函数接受date参数,并返回日期的年份。请参阅YEAR()函数的语法: YEAR(date); YEAR()函数返回一个指定日期的年份值,范围为
阅读全文
posted @
2020-09-22 02:25
Sharpest
编辑
MySQL IFNULL()函数用法MySQL 自带函数
摘要:转自:http://www.nowamagic.net/academy/detail/3203050 用法说明 1 IFNULL(expr1,expr2) 如果 expr1 不是 NULL,IFNULL() 返回 expr1,否则它返回 expr2。 IFNULL()返回一个数字或字符串值,取决于它
阅读全文
posted @
2020-09-22 02:22
Sharpest
编辑
MySQL的ROUND函数
摘要:转自:https://www.cnblogs.com/1906859953Lucas/p/11581801.html ROUND(X) ROUND(X,D) 返回参数X, 其值接近于最近似的整数。在有两个参数的情况下,返回 X ,其值保留到小数点后D位,而第D位的保留方式为四舍五入。若要接保留X值小
阅读全文
posted @
2020-09-22 02:21
Sharpest
编辑
mysql ascii()函数简介
摘要:转自:https://www.cnblogs.com/yyxianren/p/12881398.html 在mysql中ASCII()函数是把字符转换成ascii码值的函数. 语法: ASCII(str) 返回字符串str最左面字符的ASCII代码值,如果str是空字符串,返回0,如果str是NUL
阅读全文
posted @
2020-09-22 02:20
Sharpest
编辑
mysql数据库中的CONCAT_WS函数和CONCAT函数
摘要:转自:https://blog.csdn.net/czh500/article/details/99687323 mysql数据库中的CONCAT_WS函数和CONCAT函数 #在字符串之间加个分隔符 SELECT CONCAT_WS("-", "江西省", "赣州市", "于都县"); SELEC
阅读全文
posted @
2020-09-22 02:16
Sharpest
编辑
MySQL LENGTH函数:获取字符串长度
摘要:转自:http://c.biancheng.net/mysql/length.html MySQL LENGTH(str) 函数的返回值为字符串的字节长度,使用 uft8(UNICODE 的一种变长字符编码,又称万国码)编码字符集时,一个汉字是 3 个字节,一个数字或字母是一个字节。【实例】使用 L
阅读全文
posted @
2020-09-21 17:11
Sharpest
编辑
MySQL DATE_ADD() 函数
摘要:转自:https://www.codercto.com/courses/d/3155.html 定义和用法 DATE_ADD() 函数向日期添加指定的时间间隔。 语法 DATE_ADD(date,INTERVAL expr type) date 参数是合法的日期表达式。expr 参数是您希望添加的时
阅读全文
posted @
2020-09-21 17:10
Sharpest
编辑
MYSQL中的UNIX_TIMESTAMP函数
摘要:转自:https://www.cnblogs.com/ycookie/p/5157760.html 偶然看到MySQL的一个函数 unix_timestamp(),不明就里,于是就试验了一番。 unix_timestamp()函数的作用是返回一个确切的时间点的UNIX时间戳,这个Unix时间戳是一个
阅读全文
posted @
2020-09-21 17:01
Sharpest
编辑
MYSQL中,CAST函数的使用规则
摘要:转自:https://www.cnblogs.com/yangchunze/p/6667502.html CAST函数语法规则是:Cast(字段名 as 转换的类型 ),其中类型可以为: CHAR[(N)] 字符型DATE 日期型DATETIME 日期和时间型DECIMAL float型SIGNED
阅读全文
posted @
2020-09-21 16:59
Sharpest
编辑
MySQL isnull()函数基本指南
摘要:转自:https://www.yiibai.com/mysql/isnull-function.html MySQL ISNULL函数简介 ISNULL函数接受一个参数,并测试该参数是否为NULL。如果参数为NULL,则ISNULL函数返回1,否则返回0。 下面说明了ISNULL函数的语法: ISN
阅读全文
posted @
2020-09-21 16:58
Sharpest
编辑
mysql的left函数
摘要:转自:https://blog.csdn.net/weixin_30868855/article/details/95127162 1、LEFT()函数是一个字符串函数,它返回具有指定长度的字符串的左边部分。 LEFT(Str,length); 接收两个参数: str:一个字符串; length:想
阅读全文
posted @
2020-09-21 16:56
Sharpest
编辑