zoukankan      html  css  js  c++  java
  • 用SQL语句创建和删除Access数据库中的表;添加列和删除列

    用SQL语句创建和删除Access数据库中的表;添加列和删除列
    SQL语句,具体使用方法请看帮助  
       
       Create    Table    tab1    (fld1    integer)  
       Drop    Table    tab1  
       
       Alter    Table    tab1    Add    COLUMN    col1    integer  
       Alter    Table    tab1    Drop    COLUMN    col1

    2
    建立数据表  
       create    table    数据表名称(字段名称1    数据类型1(数据长度),字段名称2    数据类型2(数据长度),...)  
       
       删除数据表  
       drop    table    数据表名称  
       
       编辑数据表  
       添加字段  
       alter    table    数据表名称    add    字段名称    数据类型(数据长度)  
       
       删除字段  
       alter    table      数据表名称    drop    字段名称  
       
       字段更名  
       没有直接的更名语句,但可以用先删再除添加的方法实现  
       


    3
    建立数据表  
       create    table    数据表名称(字段名称1    数据类型1(数据长度),字段名称2    数据类型2(数据长度),...)  
       
       删除数据表  
       drop    table    数据表名称  
       
       编辑数据表  
       添加字段  
       alter    table    数据表名称    add    字段名称    数据类型(数据长度)  
       
       删除字段  
       alter    table      数据表名称    drop    字段名称
     ALTER TABLE Table1 ADD COLUMN NewCol TEXT(10) DEFAULT 'abc'

  • 相关阅读:
    Round robin
    Linux命令之nslookup
    VLAN
    基础网络概念
    python开发_filecmp
    python开发_stat
    python开发_fileinput
    python开发_os.path
    python开发_bisect
    python开发_copy(浅拷贝|深拷贝)_博主推荐
  • 原文地址:https://www.cnblogs.com/yunbo/p/1543583.html
Copyright © 2011-2022 走看看