DML (Data Manipulation Language) Data Manipulation Language:
Applicability: Perform simple operations on data in the database, such as insert, delete, update, and select.
Data Definition Language (DDL:
Applicability: manage certain objects (such as databases and tables) in a database, such as Create, Alter, and Drop.
Differences:
1. DML operations can manual
DML (data manipulation Language) Manipulation language:
Scope of application: The data in the database to do some simple operations, such as Insert,delete,update,select.
DDL (data definition Language) Definition language:
Scope of application: Manage certain objects in the database (for example, database,table), such as Create,alter and drop.
Difference:
The 1.DML
DML (data manipulation Language) Manipulation language:
Scope of application: The data in the database to do some simple operations, such as Insert,delete,update,select.
DDL (data definition Language) Definition language:
Scope of application: Manage certain objects in the database (for example, database,table), such as Create,alter and drop.
Difference:
The 1.
US LIFT joins User_role x on US. pk_id = x.fk_user_idNatural join: Equivalent connectionCommon statements:Update tb5 set name= ' xxxx ' where name= ' XJ ';Update tb5 set gender= ' F ' ORDER by name limit 1;: Only modify the first post sorted with limit 1.Show global variables like ' query_cache% ';: Query cache size, as long as the value greater than 0 is open cache, 0 means cache is offSELECT @ @GLOBAL. query_cache_size;: You can also see if the cache is enabled.Select Current_time ();: Displa
BTREE) ENGINE=InnoDB auto_increment=146 DEFAULTCHARSET=UTF8;
Insert of query Result
Insert multiple rows of data at a time (insert the results of a query into a table)--Backup(1) When a new table does not exist, create a tableCREATE TABLE EMP1 as SELECT * from EMP;
(2) As long as the table structure, do not data
CREATE TABLE EMP2 as SELECT * from EMP WHERE 1>2; ---when conditions are not true, only duplicate table structures can be executed once
(3) Create a table Emp3 with two colu
DDL: (data definition Language) database definition languageIt is the language that defines the database,The inside contains:CREATE ALTER DROP TRUNCATE CommentrenameDML: ( Data Manipulation Language ) Data Manipulation LanguageIt is the operation of the database operation language, query and update operations.The actions are:SELECT INSERT UPDATE DELETE PLANTABLEReference article: http://www.cnblogs.com/henryhappier/archive/2010/07/05/1771295.htmlhttp
Tags: height com table name permission backup type. com Oracle ACDDL operationsHow to set user permissions in WindowsData Types for OracleCtrl-click the table name to manipulate the mouseThe inserted data needs to be checked to create the tableMain Table Clazz Delete data from the table setting cascade will also be deleted togetherThere are constraints and forced deletionOracle DML OperationsSimplify paged queriesCreate a table of millions recordsBack
TABLE table name1. Alter....add-ALTER TABLE name add new Column Name field Type Fields propertyExample: Alter TABLE Jason add stuid (new list) int (field type) NOT NULL default (field property);* Field Name field type and field properties must not be converted sequentially in order.2. Alter....drop2.1-alter table name drop column name;Example: ALTER TABLE Jason drop STUID;2.2-alter table Name drop index column name; (delete unique)Example: ALTER TABLE Jason DROP INDEX stuid;2.3-alter table Name
TABLESPACE is read only, and DML and DDL operations can be performed (some examples) create a test table space create tablespace tablespacereadonly datafile '/u02/oradata/orcl/tablespacereadonly01.dbf' size 1 m autoextend on next 1 m maxsize unlimited; create user ureadonly identified by "123456" default tablespace tablespacereadonly; Authorize the test user www.2cto.com grant connect, resource to uoffline;
Ogg configuration review (dml> ddl> sequnce), dmlsequnce
SQL> @ sequence. sqlPlease enter the name of a schema for the GoldenGate database objects: goldengateSetting schema name to GOLDENGATEUPDATE_SEQUENCE STATUS: line/pos Error ---------- warn No errors No errorsGETSEQFLUSHLine/pos Error ---------- warn No errors No errorsSEQTRACELine/pos E Rror ---------- -----------------------------------------------
Mysql DDL DML language, mysqlddlDDL: Data Definition Language
CREATE, ALTER, DROP
Common commands related to CREATE:
CREATE DATABASECREATE EVENTCREATE FUNCTIONCREATE FUNCTION UDFCREATE INDEXCREATE PROCEDURECREATE SERVERCREATE TABLECREATE TABLESPACECREATE TRIGGERCREATE USERCREATE VIEW
CREATE TABLE(1) Create directly;
CREATE TABLE tablename(id INT(11) NOT NULL,name VARCHAR(256) NOT NULL);
(2) create an e
PostgreSQL Create a databaseTo create a Xifenfei library using the shell-level createdb command-bash-3.2$ Createdb XifenfeiSystem Authentication Login PostgreSQL DatabaseUsing the Xifenfei database in the psql login PostgreSQL-bash-3.2$ Psql XifenfeiPsql (9.4.4)Type ' help ' for help.PostgreSQL Simple Query TestTest SQL operations in PostgreSQL by querying versions, current dates, simple additions, and other SQL statementsxifenfei=#xifenfei=# SELECT version ();Version----------------------------
Insert data into the column ID, name, job, and salary of the Myemp table, which have data of 1001, ' Rose ', ' PROGRAMMER ', and 5500,sql statements as follows: INSERT into myemp (ID, NAME, job, salary) VALUES (1001, ' Rose ', ' PROGRAMMER ', 5500); 2.) Insert Date INSERT into myemp (ID, NAME, Job,birth) VALUES (1002, ' Martha ', ' ANALYST ', ' 1983-11-23 00:00:00 '); 4. Change the Employee table 1) Change the salary (salary) of the employee whose name is rose in the employee table to 8500.
Link navigation in this series:[Lone solitary Nine swords] Oracle Knowledge Point Grooming (a) table space, user[Lone solitary Nine swords] Oracle Knowledge Point Grooming (ii) connection of databases[Lone solitary Nine swords] Oracle Knowledge Point Grooming (iii) Import, export[Lone solitary Nine swords] Oracle Knowledge Point Grooming (iv) DML and DDL for SQL statements[Lone solitary Nine swords] Oracle
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.