zoukankan      html  css  js  c++  java
  • sql基本语句

    自增长 增加时不需要对其设置值
    仅当使用了列列表并且 IDENTITY_INSERT 为 ON 时,才能为表'nrc_type'中的标识列指定显式值。
    insert into nrc_type(t_name,t_memo) values('111','222');
    update nrc_type set t_name='222' where t_memo='222';
    delete from nrc_type where t_memo='222';

    创建表:
    create table products
    (
    prod_id char(10) not null,
    vend_id char(10) not null,
    prod_name char(254) not null,
    pro_price decimal(8,2) not null,
    pro_desc varchar(1000) null
    )

    create table orders
    (
    order_num integer not null,
    order_date datetime not null,
    cust_id char(10) not null
    )

    create table vendors
    (
    vend_id char(10) not null,
    vend_name char(50) not null,
    vend_address char(50) ,
    vend_city char(50) ,
    vend_state char(50) ,
    vend_zip char(50) ,
    vend_country char(50)
    )

    create table orderitems
    (
    order_num integer not null,
    order_item integer not null,
    prod_id char(10) not null,
    quantity integer not null default 1,
    item_price decimal(8,2) not null
    )

    alter table vendors
    add vend_phone char(20);

    alter table vendors
    drop column vend_phone;

    drop table custcopy;

  • 相关阅读:
    java监听器之实现在线人数显示
    java之web开发过滤器
    java之MVC开发模式
    java之jsp内置对象
    java之jsp页面语法
    java之jsp实现动态网页
    java数据库(MySQL)之增删改查
    java数据库之JDBC
    java线程之线程通信控制
    java线程之线程通信
  • 原文地址:https://www.cnblogs.com/daochong/p/4870360.html
Copyright © 2011-2022 走看看