The sql formatting tool can not only highlight the sql statement, but also clear the code comments in the sql and format the sql statement to make the code more beautiful.
Formatting: beautify sql code to enhance readability
Optimize compression: compress sql code size
Clear comment: remove extra comment characters
Highlight code: Use obvious colors to display sql statements
Commonly used sql statements are:
Add to:
CREATE DATABASE database name [Create a new database]
CREATE TABLE table name (column column name a type, column name b type,...) [Create a new table]
ALTER TABLE table name ADD column name type [add column]
alter table table name add constraint primary key name primary key (field a, field b) [add primary key]
create [unique] index index name on table name (field name….) [create index]
create view The name of the view as select statement [Create a new view]
delete:
DROP DATABASE database name [DROP DATABASE]
DROP TABLE table name [DROP TABLE]
ALTER TABLE table name DROP COLUMN column name [Delete a column]
alter table table name drop primary key (field name) [delete primary key]
drop index index name [delete index]
drop view name of the view [delete view]
Data table operation:
Select select * from table name where range condition
Insert into table name (table name a, table name b) values (value a, value b)
Update table name set column name=value a where range condition
Delete delete from table name where range condition
Sort select * from table name order by column name a, column name b [desc]
Find select * from table name where column name like ’% query term%’
Table data statistics operation:
Average select avg(field) as avgvalue from table name
Maximum select max(...) as maxvalue from ...
Minimum select min(...) as minvalue from ...
Sum select sum(...) as sumvalue from ...
Total select count as totalcount from ...