首页 > 代码库 > 数据库基础

数据库基础

1.SQL命令的类型:

  DDL(数据定义语言)包括:

    create table

    alter table

    drop table

    create index

    alter index

    drop index

    create view 

    alter view 

  DML(数据操作语言)包括:

    insert

    update

    delete

  DQL(数据选择语言)包括:

    select

  DCL(数据控制语言)包括:

    alter password  (修改密码)

    grant  (授予)

    revoke  (撤回)

    create synonym  (同义词)

 

2.数据类型进行显示转换函数: cast 或  convert

 

3.修改表元素属性:

  sql server: alter table ... alter column ...

  oracle: alter table ... alter modify ...

4.

  

数据库基础