• 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;

  • 相关阅读:
    安卓之视图View的基本属性
    安卓之颜色
    安卓之屏幕显示
    sockfd_to_family函数
    family_to_level函数
    mcast_get_ttl函数
    mcast_get_loop函数
    mcast_set_ttl函数
    mcast_set_loop函数
    20200730 尚硅谷 JVM 16
  • 原文地址:https://www.cnblogs.com/daochong/p/4870360.html
Copyright © 2020-2023  润新知