admin 管理员组文章数量: 1086019
2024年4月14日发(作者:duplicate keys found)
序号
1
2
命令
creat table<表名> free(字段名 类型(),…
[primary key | unique])
creat table<表名> free(字段名 类型()
[check<表达式>[error "错误信息"]][default <默认值>],…)
creat table<表名> (字段名 类型()
[refrences<表名2>[tag<标记1>]],…
[forign key <表达式>[tag<标记2>] refrences <表名3>[tag<标记
3>]])
alter table<表名> add|alter[column]<字段名1><类型>
[null | not null]
[[set]check<表达式1>[error "错误信息"]]
[[set]default<表达式2>]
alter table<表名> add|alter[column]<字段名1><类型>
……
[drop check]
[drop default]
[rename]
drop table <表名> | ?
insert into <表名>( [<字段名1>…]) values (<表达式1>……)
update <表名>set<字段名1>=<表达式1>……where<条件>
delete from <表名> [where<条件>]
3
4
5
6
7
8
9
10select [distinct] <查询项1> [as <列标题1>]…… from <表名>
11
select [distinct] <查询项1> [as <列标题1>]…… from <表名>
where <条件>
select [distinct] <查询项1> [as <列标题1>]……
from <表名1>,<表名2>……
where <条件>and <表名1.字段名1=表名2.字段名2>……
select [distinct] <查询项1> [as <列标题1>]…… from <表名>
where <查询条件> in | not in (select [distinct] <查询项2>
[as <列标题1>]…… from <表名>
where <条件>)
select [distinct] <查询项1> [as <列标题1>]…… from <表名>
where <条件>
order by <排序项1>[asc|desc]...
12
13
14
15
select [distinct] <查询项1> [as <列标题1>]…… from <表名>
where <条件>
group by <分组项1>[,<分组项2>...][having<条件>]
select [distinct] <查询项1> [as <列标题1>]…… from <表名>
where <条件>
group by <分组项1>[,<分组项2>...][having<条件>]
order by <排序项1>[asc|desc]...
into
to
select [distinct] <查询项1> [as <列标题1>]…… from <表名>
inner join(<表名2> inner join…) on 表名1.字段名1 比较运算
符
16
17
18
19
20
21
select [distinct] <查询项1> [as <列标题1>]…… from <表名1>
where <条件>
union
select [distinct] <查询项1> [as <列标题1>]…… from <表名2>
where <条件>
版权声明:本文标题:数据库VFP6.0知识总结--第5章SQL关系数据库标准语言SQL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1713103486a620028.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论