创建table:
    create table  tab_name(
    col1  type;                                       约束:主键-外键-非空-检查-唯一
    col2  type;
);                                                            删除表  : drop  table  tab_name ;

增加列:alter table tab_name  add   col5   type  default null ;
删除列:alter table tab_name drop  col5   ;

修改列属性:alter table tab_name  modify(col1   type );
修改列约束:alter table tab_name  add  primary key /unique(col1,col2,…);
          alter  table  tab_name  add foreign key (col1) references  tab_name(col1);
        alter table  tab_name  add  check ();

删除列约束:alter  table tab_name  drop constraint constra_name ;
插入内容:
insert into  tab_name(col1,col2,…)
    values(’ ’,’ ’ …);

修改现有行:
update tab_name
    set  col1=‘ X ’
        where col2= ‘Y’;

删除现有行:
delete from tab_name
    where col1=‘X’ ;

最新文章

  1. 切换“使用被动式FTP”
  2. Lind.DDD.Domain.IOwnerBehavor对实体的意义
  3. C语言学习 第四次作业总结
  4. Keep-Alive 总结
  5. Codeforces Bubble Cup 8 - Finals [Online Mirror] B. Bribes lca
  6. Codeforces Round #228 (Div. 2) C. Fox and Box Accumulation(贪心)
  7. 动态链接库DLL
  8. 【HDU 5184】 Brackets (卡特兰数)
  9. K - Ignatius and the Princess IV
  10. C#编程实践–产假方案优化版
  11. Javascript基本概念(一)
  12. 3DES 加密 解密
  13. [Spark性能调优] 源码补充 : Spark 2.1.X 中 Unified 和 Static MemoryManager
  14. 实现AutoMapper(1.0版本)
  15. SQL随记(六)
  16. git操作+一个本地项目推到github上+注意
  17. 在centos7 上安装Python3
  18. Developing Vert.x Modules with Gradle
  19. Ubuntu安装ssh 与samba
  20. nginx FastCGI错误Primary script unknown解决办法

热门文章

  1. CSS3背景
  2. php序列化和反序列化
  3. Gnu/Linux的学习探索
  4. hightchart属性(更新中...)
  5. Android AsyncTask异步任务(二)
  6. Kafka的安装和部署及测试
  7. jquery 触发/失去焦点事件例子详解
  8. article和section
  9. Gnu C的不同于标准C的语法
  10. RoR简单的应用程序