Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

sql ±íÐÞ¸ÄÁÐ

 create table #a
(
a int identity(1,1) primary key,
b int default(0) not null,
c nvarchar(20)
)
insert into #a(c)
select 'a' union all
select 'b' union all
select 'c' union all
select 'd' union all
select 'e'
select * from #a
alter table #a drop constraint DF__#a_____________b__1273C1CD
alter table #a add constraint DF__#a_____________b__1273C1CD  default(1) for b
alter table #a add  c nvarchar(10) not null constraint DF_#a_b default('aa')
--ÓÐÔ¼ÊøµÄʱºò¿ÉÒÔͨ¹ý´íÎóÌáʾÀ´²éÔ¼ÊøÃû
alter table ±íÃû drop column [ÁÐÃû]
alter table ±íÃû add [ÁÐÃû] [ÀàÐÍ] NULL CONSTRAINT [DF_±íÃû_ÁÐÃû] DEFAULT ((0))
select * from #a


Ïà¹ØÎĵµ£º

MS SQL µÝ¹éº¯Êý


/*
select *,dbo.getDeptTree(id) as DeptTree from sysdept
µÝ¹éº¯Êý
*/
CREATE  function getDeptTree(@NodeId int)
returns varchar(8000)
as
begin
    declare @ret varchar(8000),@ParentId int,@len int
    set @len = 0
  &nb ......

¾«ÃîSQL語¾ä

      1. ˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ£¬Ô´±íÃû£ºa£¬Ð±íÃû£ºb)
SQL: select * into b from a where 1<>1;
        2. ˵Ã÷£º¿½±´±í(¿½±´Êý¾Ý£¬Ô´±íÃû£ºa£¬Ä¿±ê±íÃû£ºb)
SQL: insert into b(a, b, c) select d, e, f from b;
   &nb ......

Comparison of SQL and MDX Syntax

          Comparison of SQL and MDX Syntax
The Multidimensional Expressions (MDX) syntax is similar to the syntax of Structured Query Language (SQL). In many ways, the functionality supplied by MDX is also similar to that of SQL; with effort, you can eve ......

Sql 2005Æô¶¯²»ÁË£¬±¨´íÈçÏÂʱµÄ½â¾ö°ì·¨£¡

½â¾ö°ì·¨£º
¿ªÊ¼->programs->MicroSoft SQL Server 2005->Configuration tools->SQL Server Configuration Manager
Ñ¡Ôñ SQL Server 2005 Network Configuartion-> Protocols for SQL ExpRESS ÔÙ Ñ¡Ôñ TCP/IP ÊôÐÔ  ,Ñ¡ÔñIP Addresses
IP1 µÄ IP Address ÇëÈ·ÈÏÊÇ Äã·þÎñÆ÷µÄ IPµØÖ· £¬  Èç¹û· ......

×ÔÔö×ֶεÄSQLÓï¾ä½â¾ö·½°¸

2009Äê06ÔÂ24ÈÕ 09:47
create table [±íÃû]
(
[×Ô¶¯±àºÅ×Ö¶Î] int IDENTITY (1,1) PRIMARY KEY ,
[×Ö¶Î1] nVarChar(50) default 'ĬÈÏÖµ' null ,
[×Ö¶Î2] ntext null ,
[×Ö¶Î3] datetime,
[×Ö¶Î4] money null ,
[×Ö¶Î5] int default 0,
[×Ö¶Î6] Decimal (12,4) default 0,
[×Ö¶Î7] image null ,
)
É ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ