数据库学了两章,就总结了十点:
1、创建数据库: create database+<数据库名称>
2、删除数据库: drop database+<数据库名称>
3、连接到数据库: use+<数据库名称>
4、创建表: create table+<表名称>(<列名><列的数据类型>[<列的约定>])
5、删除表: drop table+<表的名称>
6、在表里增加列: alter table+<表的名称>add+<列的名称>
7、在表里删除列: alter table+<表的名称>drop column+<列的名称>
8、修改表里面列的数据类型: alter table+<表的名称>alter column +<列的名称>+<数据类型>
9、创建索引: create index+<索引名称>on+<表或数据库名称>+<以什么作为索引>
10、删除索引: drop index+<表或数据库名称>.<要删除的索引名称>