上一页 1 ··· 70 71 72 73 74 75 76 77 78 ··· 102 下一页
摘要: 有5张表test是原始表,表结构如下SELECT TOP 10 * FROM test其他四张表都是复制test表现做如下字段添加修改--test_id添加自增IDALTER TABLE dbo.test_id ADD ID int NOT NULL IDENTITY (1, 1)SELECT TOP 10 * FROM test_id--test_guid添加guidid,默认值newidALTER TABLE dbo.test_guid ADDguidid [uniqueidentifier] NOT NULL DEFAULT (newid())SELECT TOP 10 * FROM t 阅读全文
posted @ 2011-09-05 16:02 qanholas 阅读(1126) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using jmail;namespace WindowsApplication12{ public partial class Form1 : Form { public Form1() { InitializeComp... 阅读全文
posted @ 2011-09-02 22:11 qanholas 阅读(1727) 评论(0) 推荐(0)
摘要: select * from test select ( case when len(id)>20 then name else id end ) name ,金额,数量 from (SELECT name, isnull(id,'汇总') as id, sum(金额) 金额 , SUM(数量) 数量 from (select *, cast(newid() as varchar(60)) as id from test) agroup BY name,id with CUBE ) bwhere name is not null 阅读全文
posted @ 2011-09-01 13:30 qanholas 阅读(172) 评论(0) 推荐(0)
摘要: -- Ensure a USE <databasename> statement has been executed first.SET NOCOUNT ON;DECLARE @objectid int;DECLARE @indexid int;DECLARE @partitioncount bigint;DECLARE @schemaname nvarchar(130); DECLARE @objectname nvarchar(130); DECLARE @indexname nvarchar(130); DECLARE @partitionnum bigint;DECLARE 阅读全文
posted @ 2011-09-01 13:27 qanholas 阅读(349) 评论(0) 推荐(0)
摘要: -- Ensure a USE <databasename> statement has been executed first.SET NOCOUNT ON;DECLARE @objectid int;DECLARE @indexid int;DECLARE @partitioncount bigint;DECLARE @schemaname nvarchar(130); DECLARE @objectname nvarchar(130); DECLARE @indexname nvarchar(130); DECLARE @partitionnum bigint;DECLARE 阅读全文
posted @ 2011-08-31 13:24 qanholas 阅读(265) 评论(0) 推荐(0)
上一页 1 ··· 70 71 72 73 74 75 76 77 78 ··· 102 下一页