当前位置:Gxlcms > 数据库问题 > mysql 函数的用法

mysql 函数的用法

时间:2021-07-01 10:21:17 帮助过:26人阅读

SELECT left(name,1) from a;//截取左边第一位字符

select POSITION(‘.‘ IN name) from a;//索引返回.在字符串的位置

select left(name,POSITION(‘.‘ IN name)) from a;//截取左边第几位的数字

SELECT now();//显示时间

show TABLE status where name=‘a‘ //查看表

rename table a to c;//更改表名

truncate c;  //清空表,主键自增ID被初始化为0

show TABLES//显示表名

mysql 函数的用法

标签:sel   清空   nbsp   字符   数字   函数   初始化   from   stat   

人气教程排行