SQL 单词

2022/5/30 2:21:19

本文主要是介绍SQL 单词,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

create 创建
database 数据库
table 表格
drop 删除
----alter 修改
insert into values 插入数据
update set 修改数据
delete from 删除数据
select from 查询数据
top 取前几条
percent 按百分比求前多少条
distinct 去除重复值
from 来源于哪个表
where 过滤条件
group by 分组查询
having 过滤分组以后的数据
order by 排序
asc 升序
desc 降序
sum 求和
avg 平均值
count 行记录数
max 最大
min 最小
inner join 内联
left join 左联
right join 右联
full join 全联
like %% 模糊查询
in 在某某当中 not in 不在某某之间
between and 在某某到某某之间
union 行合并
view 视图
------index 索引
as 作为
and 并
or 或
is not null 是否为空
exists 判断结果是否存在
if 如果
any :任何一个
all:全部
unique 唯一
check 检查
primary key 主键
foreign key 外键
default 默认
-函数
字符函数
charindex 在某某中间找某某
upper 大写
lower小写
ltrim 去除左边空格
rtrim 去除右边空格
substring 截取字符串
len 取字符串长度
left 取左边
right 取右边
replace 替换
日期函数
getdate()取系统当前的时间
day/month/year 日月 年
dateadd 在时间上面增减
datediff 取日期之差
datepart 求日期的某个部分
yy年 mm 月 dd天 hh 时 mi 分 ss秒 qq季
系统函数
cast/convert 强转
datalength求字节数
isnull(age,0) 如果为空了怎么办

 

 

 

 



这篇关于SQL 单词的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程