zoukankan      html  css  js  c++  java
  • Oracle、Mysql、SqlServer创建表和给表和字段加注释

    一、Oracle

    --创建表
    create table test ( 
    	 id varchar2(200) primary key not null,
    	 sort number, 
    	 name varchar(200)
    )
    --字段加注释
    comment on column test.id is 'id'; 
    comment on column test.sort is '序号';
    --表加注释
    comment on table test is '测试表'
    

     二.Mysql

    --创建表
    create table test ( 
    	 id varchar(200) not null,
    	 sort int(11) comment '排序',
    	 name varchar(200) comment  '名称',
    )			
    --表加注释
    alter table test comment ='测试表'
    

    三.SqlServer

    --创建表
    create table test ( 
    	 id varchar(200) primary key not null,
    	 sort int,
    	 name varchar(200),
    )
    
    --给字段加注释
    EXEC sp_addextendedproperty N'test', N'序号', N'user', N'dbo', N'table', N'test', N'column', N'sort';
    				
    --表加注释
    EXECUTE sp_addextendedproperty N'test', N'测试表', N'user', N'dbo',N'table', N'test', NULL, NULL
    				
    
  • 相关阅读:
    HttpClient
    充值保存
    button 样式
    创建窗口
    第十一次作业
    第十次作业
    第九次作业
    第八次作业
    第七次作业
    第六次作业
  • 原文地址:https://www.cnblogs.com/zt528/p/5386516.html
Copyright © 2011-2022 走看看