五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

SQL的核心基礎(chǔ)語法 | 快速入門MySQL

2023-07-26 21:48 作者:依索  | 我要投稿

SQL核心基礎(chǔ)語法

create database 數(shù)據(jù)庫名; #新建數(shù)據(jù)庫

use 數(shù)據(jù)庫名; #指明數(shù)據(jù)庫

create table 表格名 ( 列名1 int auto_increment primary key, 列名2 varchar() not null, 列名3 date null);??#int整形,varchar字符型,date日期

insert into 數(shù)據(jù)庫名.表格名(列名1,列名2,列名3) values (數(shù)值1,數(shù)值2,數(shù)值3);??#插入

select * from 表格名 /select 列名1 列名2 from 表格名 #查詢?

select distinct * from 表格名?#查詢?nèi)ブ?/p>

select * from 表格名 where(not) 條件 order by 列名 desc #分組排序 desc從高到低,從大到小/默認(rèn)為asc


alter table 數(shù)據(jù)庫名.表格名 add 列名 數(shù)據(jù)類型 默認(rèn)條件 #alter table egg.eggs_record add stock int null; ##增加表格列名

updata 數(shù)據(jù)庫名.表格名 set where 條件 #更新

delete from 數(shù)據(jù)庫名.表格名 #刪數(shù)據(jù)

drop table 數(shù)據(jù)庫名.表格名?#刪表

drop database 數(shù)據(jù)庫名?#刪庫


select * from inner 表1 join 表2 on 表1.列名1 = 表2.列名1; #取交集

select country from 表1 union select country from 表2 # union all 有重復(fù)值?

select * from 表1 left join 表2 on 表1.列名1 = 表2.列名1; #左連接

select * from 表1 rigtht join 表2 on 表1.列名1 = 表2.列名1 #右連接

?

SQL的核心基礎(chǔ)語法 | 快速入門MySQL的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
喜德县| 尼玛县| 柘荣县| 齐齐哈尔市| 渭南市| 兰西县| 普定县| 定结县| 广宗县| 胶州市| 孙吴县| 南陵县| 镶黄旗| 香港 | 隆林| 兰考县| 宁国市| 绵阳市| 台东县| 荃湾区| 绿春县| 喀什市| 隆昌县| 平邑县| 全南县| 宁晋县| 吉安市| 绩溪县| 乌苏市| 邻水| 平和县| 天台县| 民县| 神池县| 兴义市| 桂阳县| 博野县| 丰顺县| 吉林省| 绥德县| 新沂市|