程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SqlServer數據庫 >> 關於SqlServer >> SQL中的DDL,DML,DCL語言

SQL中的DDL,DML,DCL語言

編輯:關於SqlServer


   感覺自己是比較笨的,學習過SQL語言,但是卻分不太清楚DDL、DML、DCL語言,所以呢,今天就厚著臉皮問了老師,現在就自己目前的了解來總結一下。

1、DDL(DATA DEFINITION LANGUAGE)數據描述語言

     DDL語句不會產生還原數據,所以刪除的數據也是無法恢復的

CREATE - to create objects in the database
ALTER - alters the structure of the database
DROP - delete objects from the database
TRUNCATE - remove all records from a table, including all spaces allocated for the records are removed
COMMENT - add comments to the data dictionary
GRANT - gives user's Access privileges to database
REVOKE - withdraw Access privileges given with the GRANT command

2、DML(DATA MANIPULATION LANGUAGE)數據操縱魚語言

SELECT - retrIEve data from the a database
INSERT - insert data into a table
UPDATE - updates existing data within a table
DELETE - deletes all records from a table, the space for the records remain
CALL - call a PL/SQL or Java subprogram
EXPLAIN PLAN - explain Access path to data
LOCK TABLE - control concurrency

3、DCL(DATA CONTROL LANGUAGE)數據控制語言

COMMIT - save work done
SAVEPOINT - identify a point in a transaction to which you can later roll back
ROLLBACK - restore database to original since the last COMMIT
SET TRANSACTION - Change transaction options like what rollback segment to use
感覺是要好那麼一點了,至少不那麼糊塗了,畢竟自己也學了那麼久,不能什麼都不知道三,不能只曉得就一個create、update、drop,嘿

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved