Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : sql

sql Çó¾È ¸ßÊÖÀ´

--¶¨ÒåÈ«¾ÖÁÙʱ±í
declare @temp table(id int identity,¸¨ÖúÏÃÅ nvarchar(100),¿Í»§ nvarchar (100),
    ÏîÄ¿Ãû³Æ nvarchar (100),¸¨ÖúÏîµÄÏúÊÛÒµÎñÀà±ð nvarchar (100),¿ÆÄ¿Ãû³Æ nvarchar (100),
    ½è·½½ð¶î float ,´û·½½ð¶î float)
--¶¨Òå¿ÆÄ¿±í
declare @tempTable table( ¿Æ ......

sql ÎʸßÊÖ

Êý¾Ý¿â
id  subject  shu  liang  Ò»  ¶þ  Èý
1    Ò»        100  200   
2    ¶þ        333  111
3    Èý        44    55

Çó ......

sqlÓïÑÔÎÊÌâ

xuehao '#9'VarChar(100) NOT NULL  Default 0,  --12  20'#23383#33410#9#24080#25143#22995#21517
ÄܰïÎÒ½âÊÍһϠÿ¸ö´Ê´ú±íµÄÒâ˼Â𣿠лл£¡
ºóÃæÄÇÒ»´®ÊÇʲô£¿

'#9' Õâ¸öÊÇ´íµÄ¡£
xuehaoÊǶ¨ÒåÒ»¸ö×Ö¶ÎÃû£¬VarChar(100)×Ö¶ÎÀàÐÍ£¬NOT NULL·Ç¿ÕÔ¼Êø£¬Default 0 ¶¨ÒåÄ ......

ÎʸöSQLÔõôд

ÏÖÔÚÓÐ2¸ö±í
Group±í
SQL code:

GroupID GroupName
1 A×é
2 B×é


UserGroup±í
SQL code:

ID UserID GroupID
1 3 1
2 4 1


ÏÖÔÚÎÒÏëÈ¡³öÕâÑùµÄÊý¾Ý
GroupID  GroupName    Group±íÖеÄÓ ......

¼òµ¥µÄSQLÎÊÌ⣡

SQL code:

declare @t1 table(ÊýÖµ decimal(10,2))
insert into @t1 values(200)
insert into @t1 values(150)
insert into @t1 values(199)
insert into @t1 values(200)
select sum(ÊýÖµ)as a ,a*2 as b from @t1
ÏëÒªµÄ½á¹û
===========================================
a b
749.00 14 ......

Çë½ÌSQLÓï¾ä

A±í£¨Ö÷±í£©
A1£¨Ö÷¼ü£©    A2
1            ÕÅÈý


B±í
B1£¨Íâ¼ü£©    B2
1              ZHONG
1              GUO


C±í
C1£¨Íâ¼ü£©    C ......
×ܼǼÊý:3315; ×ÜÒ³Êý:553; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [477] [478] [479] [480] 481 [482] [483] [484] [485] [486]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ