
今天来一起学习MySQL数据库的内置函数。
目录
日期函数
current_date
current_time
current_timestamp
date_add
date_sub
datediff
实例演示
创建一张表,记录生日
创建一个留言表
字符串函数
charset
concat
length
replace
substring
ucase/lcase
instr
left/right
ltrim/rtrim/trim
案例实验
以首字母小写的方式显示所有员工的姓名
数学函数
abs
bin
hex
conv
ceiling
floor
format
rand
mod
其他函数
user
md5
password
database
ifnull
日期函数

current_date
current_time

current_timestamp

date_add

date_sub

datediff

实例演示
创建一张表,记录生日

创建一个留言表
方法一

方法二

请查询在2分钟内发布的帖子

字符串函数

charset

concat

length

replace

substring

ucase/lcase

instr

left/right

ltrim/rtrim/trim

案例实验
以首字母小写的方式显示所有员工的姓名

数学函数

abs

bin

hex

conv

ceiling

floor

format

rand

mod

其他函数
user

md5

password

database

ifnull

看到这里,给博主点个赞吧~















![[附源码]SSM计算机毕业设计在线二手车交易信息管理系统JAVA](https://img-blog.csdnimg.cn/1b459753ce0e47b390d8112b3f4c024f.png)



