Home >Database >Mysql Tutorial >What is the function of sql statement?
Structured Query Language (Structured Query Language) is referred to as SQL. Structured Query Language is a database query and programming language used to access data, query, update and manage relationships. Database system;
sql statement is a language used to operate the database.
Program functions:
1. Create database
CREATE DATABASE database-name
2. Delete database
drop database dbname
3. Create new Table
create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..)
4. Delete new table
drop table tabname
5. Add a column
Alter table tabname add column col type
6. Add primary key
Alter table tabname add primary key(col)
7. Delete primary key
Alter table tabname drop primary key(col)
8. Create index
create [unique] index idxname on tabname(col….)
9. Delete index
drop index idxname
10. Create view
create view viewname as select statement
11. Delete view
drop view viewname
The above is the detailed content of What is the function of sql statement?. For more information, please follow other related articles on the PHP Chinese website!