zoukankan
html css js c++ java
分区视图试验代码
if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[customer_s]
'
)
and
OBJECTPROPERTY
(id, N
'
IsUserTable
'
)
=
1
)
drop
table
[
dbo
]
.
[
customer_s
]
GO
CREATE
TABLE
[
dbo
]
.
[
customer_s
]
(
[
customer_id
]
INT
,
[
account_num
]
[
float
]
NULL
,
[
lname
]
[
nvarchar
]
(
100
) COLLATE Chinese_PRC_CI_AS
NULL
,
[
fname
]
[
nvarchar
]
(
50
) COLLATE Chinese_PRC_CI_AS
NULL
,
CONSTRAINT
[
PK_customer_s
]
PRIMARY
KEY
CLUSTERED
(customer_id),
CONSTRAINT
[
CK_customer_s
]
CHECK
(
[
customer_id
]
<=
1000
)
)
ON
[
PRIMARY
]
GO
if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[customer_m]
'
)
and
OBJECTPROPERTY
(id, N
'
IsUserTable
'
)
=
1
)
drop
table
[
dbo
]
.
[
customer_m
]
GO
CREATE
TABLE
[
dbo
]
.
[
customer_m
]
(
[
customer_id
]
INT
,
[
account_num
]
[
float
]
NULL
,
[
lname
]
[
nvarchar
]
(
100
) COLLATE Chinese_PRC_CI_AS
NULL
,
[
fname
]
[
nvarchar
]
(
50
) COLLATE Chinese_PRC_CI_AS
NULL
,
CONSTRAINT
[
PK_customer_m
]
PRIMARY
KEY
CLUSTERED
(customer_id),
CONSTRAINT
[
CK_customer_m
]
CHECK
(
[
customer_id
]
>
1000
)
)
ON
[
PRIMARY
]
GO
if
exists
(
select
*
from
dbo.sysobjects
where
id
=
object_id
(N
'
[dbo].[v_customer]
'
)
and
OBJECTPROPERTY
(id, N
'
IsView
'
)
=
1
)
drop
view
[
dbo
]
.
[
v_customer
]
GO
CREATE
VIEW
v_customer
AS
SELECT
*
FROM
customer_s
UNION
ALL
SELECT
*
FROM
customer_m
GO
INSERT
INTO
v_customer(customer_id,account_num,lname,fname)
SELECT
customer_id,account_num,lname,fname
FROM
customer
查看全文
相关阅读:
只要三步,使用html5+js实现像素风头像生成器
按Ctrl+Enter发送的实现
“放到桌面”的Servlet实现
从tom大叔那想着拿书的,呵呵。
也写dateUtil.js
智习室
零基础爬虫课,不会编程也能做爬虫
1小时教你学会如何采集微博数据:0基础小白也能轻松学会!
TransactionScope 分布式事务配置
centos7创建共享文件夹
原文地址:https://www.cnblogs.com/goodspeed/p/26264.html
最新文章
sublime返回上一编辑位置
win平台,apache通过web访问svn
精心制作新游戏,弱联网单机游戏
两三天时间山寨的游戏,脸出没
[转]使用ant让Android自动打包的build.xml,自动生成签名的apk文件(支持android4.0以上的版本)
好久没用笔画画了,最近在家休养,来几幅程序员画的画
一个方法告诉你as3的removeChild性能有多烂
转:php park、unpark、ord 函数使用方法(二进制流接口应用实例)
34个方法告诉你增粉秘籍
1000名种子用户如何发展?憨厚最靠谱
热门文章
微信时代如何提高你的人脉
自媒体,自明星新手应该如何推广
秦刚:商场小店铺生存艰难怎么办?
免费
秦刚访谈:如何玩转一个领域社群?
hadoop学习之路1--centos7群集安装
wonderware historian 10安装配置
干掉windows无脑设定:“始终使用选择的程序打开这种文件”、“使用Web服务查找正确的程序”
GIT命令一页纸
用html和css轻松实现康奈尔笔记(5R笔记)模板
Copyright © 2011-2022 走看看