![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL Servr
ssll7759
这个作者很懒,什么都没留下…
展开
-
使用公用表表达式(CTE)简化嵌套SQL
转自 http://www.cnblogs.com/nokiaguy/archive/2009/02/05/1384860.htm 先看下面一个嵌套的查询语句: select*from person.StateProvince where CountryRegionCode in (select CountryRegionCode from person转载 2012-04-28 17:59:13 · 1020 阅读 · 0 评论 -
联合主键建立方法
create table Cart ( [UserID] uniqueidentifier not null, [ProductID] int not null, [ProductName] varchar(80) not null, [Price] [decimal](10, 2) NOT NULL, [ImagePath] [varchar](100)原创 2012-05-06 14:03:02 · 528 阅读 · 0 评论 -
SQL Server 2005 导出 数据脚本
SQL Server 2005没有直接生成表内容的脚本功能 需要手动实现 CREATE PROCEDURE dbo.UspOutputData @tablename sysname AS BEGIN declare @column varchar(1000) declare @columndata varchar(1000) declare @sql varchar(4000)原创 2012-03-23 21:36:21 · 6347 阅读 · 0 评论