SQL Command Categories DDL CREATE ALTER DROP TRUNCATE
- Slides: 14
SQL Command Categories DDL CREATE ALTER DROP TRUNCATE COMMENT RENAME DML SELECT INSERT UPDATE DELETE MERGE CALL EXPLAIN PLAN LOCK TABLE DCL GRANT REVOKE https: //www. w 3 schools. in/mysql/ddl-dml-dcl/ TCL COMMIT ROLLBACK SAVEPOINT SET TRANSACTION
Data Definition Language (DDL) เปนคำสงในการจดการโครงสรางของฐานขอมล เชน เพมตาราง (CREATE Table) , ลบตาราง (DROP Table) CREATE : to create database and its objects like (table, index, views, store procedure, function and triggers) (สราง ) ALTER : alters the structure of the existing 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 RENAME : rename an object https: //www. w 3 schools. in/mysql/ddl-dml-dcl/
Data Manipulation Language (DML) จดการขอมลในฐานขอมล (Database) SELECT – retrieve data from the a database INSERT – insert data into a table UPDATE – updates existing data within a table DELETE – Delete all records from a database table MERGE – UPSERT operation (insert or update) CALL – call a PL/SQL or Java subprogram EXPLAIN PLAN – interpretation of the data access path LOCK TABLE – concurrency Control
Data Control Language (DCL) เปนการควบคมการเขาถงขอมล GRANT – allow users access privileges to database REVOKE – withdraw users access privileges given by using the GRANT command
Transaction Control Language (TCL) จดการการประมวลผลขอมลในฐานขอมล COMMIT – commits a Transaction เปน การยนยน การเปลยนแปลงขอมล ROLLBACK – rollback a transaction in case of any error occurs ดงขอมลเกากอนหนากลบมา SAVEPOINT – to rollback the transaction making points within groups กำหนดจดของขอมล ทให rollback ขอมลกลบมา SET TRANSACTION – specify characteristics for the transaction เปน การกำหนด คณสมบตของ transaction
คำสง Select field name /[*][Count(? )] From table name [Where condition] [Order by field name desc/asc] Select Product_name From Product Where Product_id=‘G 001’ Select * From TPS_Product Where Product_Id <>'G 001‘ Order by field name desc Select Desc เรยงจากมากไปนอย Asc เรยงจากนอยไปมาก
คำสง Select * From TPS_Product Where Product_Id like '%001' Order by Product_Id asc Select
คำสง Select Built-in Function Min (นอยสด ), Max (มากสด ), AVG (คาเฉลย ), Count (จำนวนนบ ), Sum (จำนวนรวม ) Select count(Product_id) From TPS_Product Select Branch_No, Product_Id, Date, SUM(Total_amount) From Stage_Sale. Data group by DATE, Product_Id, Branch_No
คำสง Delete from Table_Name [Where condition] Delete From TPS_Product (!!! คำสงน จะลบ Table) พงระวงเสมอ Delete From TPS_Product Where Product_id='G 001' Delete
คำสง Delete Update Table. Name Set Field. Name=Value [Where condition] Update Product Set Product_Name='Water' (!!! คำสงนจะแกไขทง Table) พงระวงเสมอ Update Product Set Product_Name='Water' Where Product_id='G 001'
Reference • https: //www. w 3 schools. in/mysql/ddl-dml-dcl/
- Create alter drop truncate are ddl commands
- Contoh data manipulation language
- Ddl dml
- Dictinarycom
- Informix truncate table
- Morphology of bony fish
- Openedge prorest
- Jika noel(create(q)) adalah 0, maka front(create(q)) adalah
- Update sql command
- Oracle sql command line
- Sql command types
- The sql data manipulation command having:
- Structured query language (sql) is an example of a(n)
- Sql server create database
- Not exists in sql