Add Insert Delete Delete change update check Select
Update change alter
Creating a Database Create db
See how many databases show databases
Using the database Use DB
Delete Database Drop db
CREATE TABLE table name (column name data type [NOT NULL] [primary key], column name data type [NOT NULL],..)
View all tables Show tables
View a table data select * FROM table name * represents all columns also can select Column name from table name
DROP table Name
Change table name rename table name to new table name
Modify table content modify Data Update table name set column name = value, column name = value ... where column name = value
Add Table content Insert data inserts into table name (column name, column name ...) Values (value, value ...) )
Modify a record in a column Update table name set column = value where column = value
Delete a record in a column delete from table name where column = value
Add a column Alter table name add column name data type
Remove a column Alter table name drop column name
Modify a column name sp_rename ' table name, original column name ', ' new column name ', ' column ' Note: The new column name does not precede the table name, otherwise, the changed column name is: Table name. NEW Column Name
Desc Descending sort
ASC Ascending order
Delete delete record structure still exists that can also be found after execution has a commit process
Drop structure and data are removed one-step operation completed
SQL Basic Statement