Straight to the point------F4
1. Enquiry
Search queries for the specified data table or view to find the functionality that meets the query criteria, including the following SQL syntax, where "" is optional
select< Column name > from< table name > Where < condition >group by < column name > having < condition >order by< column name > "
2. Defining the DDL
Data definition Language, a language used to define and revoke a specified database object (data tables, views, indexes, stored procedures, users, etc.),
①. The "Create table/alter table/drop table" statement for the data table in the Creating/modifying/deleting operation;
②. The "Create User/alter user/drop User" statement for the database user in the creating, modifying password/delete operation;
③. The "Create Index/drop index" statement that creates and deletes the data index;
These are the DDL categories.
3. Manipulating DML
Data manipulation, Language, also known as Data Update, refers to the data in the database in addition to the query other than the update operation, mainly including additions and deletions, the specific syntax is as follows:
① Inserting data
Insert into< Table name > (< column name 1>[{,< column name 2>}]) "VALUES (< value 1> {,< value 2>}")
② Deleting data
Delete from < table name >[where < condition >]
③ modifying (updating) data
update< table name > SET < column name >=< expression >[,< column name >=< expression;] ... [where< conditions;]
4. Controlling the DCL
Date control Language, that is, data controls, mainly used to manage database user rights, data integrity, security concurrency and other database management operations, the syntax for granting and recovering user rights is as follows
㈠ Granting user rights
grant< system Administration >|< roles > {,< system permissions >|< roles;} to< user name >|< role >| Public "{,< username >|< role >" "With ADMIN OPTION"
㈡ Reclaim User Rights
revoke< system Administration >|< roles > {,< system permissions >|< roles;} from< user name >|< role >| Public "{,< User name >|< role >"
SQL Basics Review