SQL是一种ANSI(美国国家标准协会)的标准,但也有许多不同版本的SQL语言。

SQL是什么?

SQL是结构化查询语言,这是一种计算机语言,用于存储,操纵和检索存储在关系数据库中的数据。

SQL是关系数据库系统的标准语言。所有关系型数据库管理系统,如MySQL, MS Access, Oracle, Sybase, Informix, postgres 和SQL Server使用SQL作为标准数据库语言。

此外,它们也使用不同的方言,如:

  • MS SQL Server 使用 T-SQL,

  • Oracle 使用 PL/SQL,

  • MS Access 的SQL版本叫 JET SQL (本地格式) 等

为什么使用SQL?

  • 允许用户访问在关系数据库管理系统的数据。

  • 让用户来描述数据。

  • 允许用户定义数据库中的数据和处理数据。

  • 允许使用SQL模块,库和预编译器的其他语言中嵌入。

  • 允许用户创建和删除数据库和表。

  • 允许用户创建视图,存储过程,函数在数据库中。

  • 允许用户设置表,过程和视图的权限

历史:

  • 1970 -- Dr. Edgar F. "Ted"  IBM的科德被称为关系数据库之父,是他描述了数据库的关系模型。

  • 1974 -- 结构化查询语言出现。

  • 1978 -- IBM合作开发Codd的想法并发布了名为System/R的产品。

  • 1986 -- IBM开发了关系型数据库的第一台样机,并通过ANSI标准化。第一个关系型数据库是由关系型软件及其后来成为甲骨文发布。

SQL处理:

当你对任何RDBMS执行SQL命令,系统决定开展您的要求的最佳途径和SQL引擎计算出如何解析任务。

有包括在过程中的各种组件。这些组件查询调度,优化引擎,经典查询引擎和SQL查询引擎等等。经典查询引擎处理所有非SQL查询,但SQL查询引擎不会处理逻辑文件。

以下是显示SQL架构一个简单的图表:

SQL架构

SQL命令:

标准的SQL命令进行互动使用在关系型数据库有:CREATE, SELECT, INSERT, UPDATE, DELETE 和 DROP。这些命令可分为基于其性质组。

DDL - 数据定义语言:

命令 描述
CREATE 创建一个新的表,表的视图,或者在数据库中的对象
ALTER 修改现有的数据库对象,例如一个表
DROP 删除整个表,数据库中的表或其他对象或视图

DML - 数据操纵语言:

命令 描述
SELECT 从一个或多个表中检索特定的记录
INSERT 创建记录
UPDATE 修改记录
DELETE 删除记录
命令 描述
GRANT 授予用户权限
REVOKE 收回用户授予的权限
658阅读 | 0评论
你的回应
  • etumivamoq

    2019-03-18 12:54:41 etumivamoq

    Heavy mli.mhmp.osbaike.net.stk.vl blows set [URL=http://websolutionsdone.com/propecia/]propecia[/URL] online propecia http://websolutionsdone.com/propecia/#buy-propecia-online buy propecia online propecia [URL=http://websolutionsdone.com/viagra/]viagra for sale[/URL] viagra uk http://websolutionsdone.com/viagra/#viagra-online viagra [URL=http://openastorenow.com/personal-loan/]personal loans austin tx[/URL] personal loan interest rates in usa http://openastorenow.com/personal-loan/#personal-loan personal loan [URL=http://refrigeratordealers.com/amoxicillin/]500 mg amoxicillin[/URL] amoxil http://refrigeratordealers.com/amoxicillin/#www.amoxicillin500mg.org amoxicillin online [URL=http://refrigeratordealers.com/prednisone/]prednisone[/URL] buy prednisone online http://refrigeratordealers.com/prednisone/#buy-prednisone-online prednisone order [URL=http://anger-management-action.com/payday-loans-irving-tx/]direct online lenders[/URL] payday loans http://anger-management-action.com/payday-loans-irving-tx/#loan-to-pay-off-payday-loans payday loans [URL=http://umichicago.com/short-cash-loans/]cash loans columbus ohio[/URL] cash loans http://umichicago.com/short-cash-loans/#short-cash-loans short cash loans [URL=http://palawan-resorts.com/canadian-pharmacy-online/]canada pharmacy online no script[/URL] pharmacy http:

  • aqimedigiton

    2019-02-25 16:25:39 aqimedigiton

    She zyi.gwmw.osbaike.net.ham.nf stomach; [URL=http://davincipictures.com/retin-a/]buy retin a online[/URL] tretinoin cream 0.1 http://davincipictures.com/retin-a/#where-to-buy-tretinoin-gel retin a cream [URL=http://davincipictures.com/prednisone/]buy prednisone[/URL] buy prednisone without prescription http://davincipictures.com/prednisone/#buy-prednisone prednisone without dr prescription usa [URL=http://davincipictures.com/doxycycline/]doxycycline[/URL]

  • eqotvazexk

    2019-02-19 22:22:25 eqotvazexk

    The wor.jgbv.osbaike.net.myi.os describe pulsatile; dehydrated [URL=http://michiganvacantproperty.org/buy-propecia/]propecia pills[/URL] online propecia http://michiganvacantproperty.org/buy-propecia/#propecia-online-pharmacy propecia pills [URL=http://scoverage.org/celebrex-200-mg/]celebrex[/URL] celebrex 200 mg http://scoverage.org/celebrex-200-mg/#celebrex celebrex generic [URL=http://biblebaptistny.org/nolvadex/]nolvadex in uk[/URL]

  • sedpakewenoba

    2019-02-14 09:42:42 sedpakewenoba

    Later, cle.ycpb.osbaike.net.tfa.hu pre-operatively plus training [URL=http://secretsofthearchmages.net/ventolin/]ventolin[/URL] buy ventolin http://secretsofthearchmages.net/ventolin/ ventolin [URL=http://otrmatters.com/levitra-20mg/]wife levitra[/URL] levitra 20mg http://otrmatters.com/levitra-20mg/ pharmacy prices for levitra [URL=http://kelipaan.com/flagyl/]metronidazole 500 mg antibiotic[/URL] flagyl http://kelipaan.com/flagyl/ buy metronidazole online [URL=http://gocyclingcolombia.com/generic-levitra-vardenafil-20mg/]levitra 20mg[/URL] generic levitra vardenafil 20mg http://gocyclingcolombia.com/generic-levitra-vardenafil-20mg/ levitraonline [URL=http://playinguphockey.com/generic-levitra/]levitra 20 mg[/URL] generic levitra http://playinguphockey.com/generic-levitra/ levitra 20mg vardenafil 20mg [URL=http://webodtechnologies.com/cialis-online/]cialis online[/URL] tadalafil 20mg lowest price http://webodtechnologies.com/cialis-online/ cialis [URL=http://gocyclingcolombia.com/levitra-20-mg/]levitra[/URL] levitra http://gocyclingcolombia.com/levitra-20-mg/ levitra 20 mg [URL=http://webodtechnologies.com/generic-levitra-20mg/]best price levitra 20 mg[/URL] levitra http://webodtechnologies.com/generic-levitra-20mg/ best price levitra 20 mg [URL=http://a1sewcraft.com/walmart-

  • opapijaxigut

    2019-02-13 16:19:45 opapijaxigut

    Background div.dpvo.osbaike.net.hul.ok compensates goes [URL=http://iranascience.com/viagra-generic/]viagra generic[/URL] generic viagra 50mg http://iranascience.com/viagra-generic/ buy viagra online [URL=http://playinguphockey.com/zoloft/]zoloft no prescription[/URL] zoloft no prescription http://playinguphockey.com/zoloft/ zoloft medicine [URL=http://cveto4ki.com/inderal/]inderal[/URL] buy inderal online http://cveto

  • ecebuce

    2019-02-10 18:17:58 ecebuce

    The jmd.skpb.osbaike.net.kob.nm shown aspergillosis [URL=http://gocyclingcolombia.com/cipro/]cipro[/URL] cipro http://gocyclingcolombia.com/cipro/ buy ciprofloxacin 500 mg [URL=http://healinghorsessanctuary.com/levitra/]generic levitra online[/URL] levitra generic 20 mg http://healinghorsessanctuary.com/levitra/ levitra generic lowest prices [URL=http://webodtechnologies.com/retin-a-cream/]retin a cream[/URL] renova cheap http://webodtechnologies.com/retin-a-cream/ retin a online [URL=http://webodtechnologies.com/buy-viagra/]viagra canada[/URL] viagra online canada http://webodtechnologies.com/buy-viagra/ low price viagra 100mg [URL=http://fitnesscabbage.com/generica-cialis/]cialis black[/URL] generica cialis http://fitnesscabbage.com/generica-cialis/ generica cialis [URL=http://dockpartsusa.com/zoloft-online/]buy zoloft[/URL] buy sertraline http://dockpartsusa.com/zoloft-online/ zoloft [URL=http://techiehubs.com/viagra-generic/]buy generic viagra[/URL] viagra generic http://techiehubs.com/viagra-generic/ viagra [URL=http://a1sewcraft.com/furosemide-without-prescription/]diuretic and lasix[/URL] lasix overdose http://a1sewcraft.com/furosemide-without-prescription/ furosemide cat [URL=http://nothingbuthoops.net/viagra/]viagra[/URL]

  • igiwlupu

    2019-02-10 16:22:25 igiwlupu

    Venous, hoa.ystq.osbaike.net.zgm.tt screened poisonous salpingo-oophorectomy [URL=http://desktopindia.com/pharmacy/]pharmacy[/URL] cialis canadian pharmacy http://desktopindia.com/pharmacy/ cialis from canadian pharmacy [URL=http://gocyclingcolombia.com/levitra-20-mg/]levitra[/URL] levitra 20 mg http://gocyclingcolombia.com/levitra-20-mg/ www.levitra [URL=http://ahecanada.com/levitra/]levitra online[/URL] levitra http://ahecanada

  • eosinozsozu

    2019-02-06 00:56:52 eosinozsozu

    Without xgt.mbyg.osbaike.net.vgv.hm anaemic displays twentieth these digoxin, pregnancy and accutane levitra levitra 20 mg prices levitra generic tadalafil 20mg buy tamoxifen online cheapest pharmacy to buy accutane

  • owisiwaqeca

    2019-02-04 22:16:11 owisiwaqeca

    Both sta.gipu.osbaike.net.qwa.ts diastasis lab, depicts strangury; displaced, canadian pharmacy viagra no prescription accutane viagra generic priligy priligy dapoxetine can accutane cause chin hari buy furosemide online

  • ejoifacakoval

    2019-01-19 16:32:58 ejoifacakoval

    Scans tba.typh.osbaike.net.mqy.nt palpation importance, hypercoagulable how fast does cialis work cheap viagra pills viagra priligy online dapoxetine 60mg levitra for sale buying levitra viagra viagra online purch

1 2
联系我们