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
Ïà¹ØÎĵµ£º
---------Êýѧº¯Êý
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:select cast ......
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 SERVER 2005ϵÁÐ]×¼±¸°Ñѧϰ2005µÄһЩÐĵÃÕûÀí³öÀ´£¬ºÍ´ó¼Ò·ÖÏí£¬¹²Í¬Ñ§Ï°Ò»ÆðÌá¸ß¡£
°²×°×¼±¸£º
1¡¢SQL Server 2005 µÄ¸÷°æ±¾Ö®¼äÑ¡Ôñ
¡¡¡¡´ó¶àÊýÆóÒµ¶¼ÔÚÈý¸ö SQL Server °æ±¾Ö®¼äÑ¡Ôñ£ºSQL Server 2005 Enterprise Edition¡¢SQL Server 2005 Standard Edition ºÍ SQL Server 2 ......
ÎÒÔÚÉè¼ÆÊý¾Ý¿âµÄʱºò»á¿¼Âǵ½ÄÄЩÊý¾Ý×ֶν«À´¿ÉÄܻᷢÉú±ä¸ü¡£±È·½Ëµ£¬ÐÕÊϾÍÊÇÈç´Ë£¨×¢ÒâÊÇÎ÷·½È˵ÄÐÕÊÏ£¬±ÈÈçÅ®ÐÔ½á»éºó´Ó·òÐյȣ©¡£ËùÒÔ£¬ÔÚ½¨Á¢ÏµÍ³´æ´¢¿Í»§ÐÅϢʱ£¬ÎÒÇãÏòÓÚÔÚµ¥¶ÀµÄÒ»¸öÊý¾Ý±íÀï´æ´¢ÐÕÊÏ×ֶΣ¬¶øÇÒ»¹¸½¼ÓÆðʼÈÕºÍÖÕÖ¹ÈÕµÈ×ֶΣ¬ÕâÑù¾Í¿ÉÒÔ¸ú×ÙÕâÒ»Êý¾ÝÌõÄ¿µÄ±ä»¯¡£
²ÉÓÃÓÐÒâÒåµÄ×Ö¶ÎÃû
ÓÐÒ»»ØÎÒ ......
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 ,
)
É ......