170
技术社区[云栖]
对于PowerDesigner中设计表自动生成Sql的分析
if exists (select 1 from sysobjects where id = object_id('DWLX') and type = 'U') drop table DWLX go /*==============================================================*/ /* Table: DWLX */ /*==============================================================*/ create table DWLX ( DWLX_NM varchar(36) not null, DWLX_LXBH varchar(6) not null, DWLX_LXMC varchar(64) not null, DWLX_LEVEL int not null, DWLX_FJNM varchar(36) not null, DWLX_MX char(1) not null, constraint PK_DWLX primary key nonclustered (DWLX_NM) ) go
分析constraint PK_DWLX primary key nonclustered (DWLX_NM)这句话:
对表DWLX建立主键约束,主键约束的名字是:PK_DWLX ,主键列是:DWLX_NM。
PRIMARY KEY 约束默认为 CLUSTERED;UNIQUE 约束默认为 NONCLUSTERED。此处指明该表为nonclustered索引(即非聚集索引)。
小注:
1、Sql Server判断某个表是否存在:点击打开链接。
2、SQL Server中clustered与nonclustered的区别 :点击打开链接。
3、GO的意思是本语句块结束的意思,一遇到GO就直接提交到存储引擎。
GO (Transact-SQL)官方文档:点击打开链接
最后更新:2017-04-03 12:55:41
上一篇:
SQL Server DATEADD() 函数
下一篇:
使用ptrace跟踪进程
《Hadoop与大数据挖掘》一2.6 TF-IDF算法原理及Hadoop MapReduce实现
ComBox控件下拉框选项的添加
COM编程入门第一部分——什么是COM,如何使用COM
Inside ARC — to see the code inserted by the compiler
ALICloudDB for PostgreSQL 试用报告 - 4 水平分库 之 节点扩展
《iOS网络编程与云端应用最佳实践》微博转发送书了
小米2S电池电量用尽充电无法开机解决方法
一张图看懂阿里云网络产品[七]共享流量包
problem中Project'XX'is missing required library:'[路径]\XXX.jar'解决方法
博拉科技浅谈中国企业的智能制造之路