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

SQLÇó½â°Ë»ÊºóÎÊÌ⣨92ÖÖ½á¹û£©

--¸Ã±í±£´æ½á¹û
create table c(c1 tinyint, c2 tinyint, c3 tinyint, c4 tinyint, c5 tinyint, c6 tinyint, c7 tinyint, c8 tinyint, c9 tinyint, c10 tinyint, c11 tinyint, c12 tinyint, c13 tinyint, c14 tinyint, c15 tinyint, c16 tinyint, c17 tinyint, c18 tinyint, c19 tinyint, c20 tinyint, c21 tinyint, c22 tinyint, c23 tinyint, c24 tinyint, c25 tinyint, c26 tinyint, c27 tinyint, c28 tinyint, c29 tinyint, c30 tinyint, c31 tinyint, c32 tinyint, c33 tinyint, c34 tinyint, c35 tinyint, c36 tinyint, c37 tinyint, c38 tinyint, c39 tinyint, c40 tinyint, c41 tinyint, c42 tinyint, c43 tinyint, c44 tinyint, c45 tinyint, c46 tinyint, c47 tinyint, c48 tinyint, c49 tinyint, c50 tinyint, c51 tinyint, c52 tinyint, c53 tinyint, c54 tinyint, c55 tinyint, c56 tinyint, c57 tinyint, c58 tinyint, c59 tinyint, c60 tinyint, c61 tinyint, c62 tinyint, c63 tinyint, c64 tinyint)
--¸Ã±í×öµÑ¿¨¶û»ý
create table tb(t tinyint)
insert into tb
select 1 union
select 0
--½«tb±í×ö64´ÎµÑ¿¨¶û»ý£¬²úÉúËùÓеĿÉÄÜÀàÐÍ
--¸ù¾Ý¹ÀË㣬һ¹²ÓÐ2µÄ64´Î·½ÖÖ¿ÉÄÜ£¬Ã¿Ò»ÖÖ¿ÉÄÜÔÚ±ícÖÐÓÃ64¸ötinyintÐ͵Ä×ֶα£´æ
--ÎÞ·¨±£´æËùÓеĿÉÄÜ£¨´óÔ¼134217728T£©
--Ò»ÏÂÓï¾äÏÈ×öµÏ¿¨»ý£¬È»ºó´Ó½á¹ûÖÐɸѡ
insert into c
select * from
(
select tb1.t c1 ,tb2.t c2 ,tb3.t c3 ,tb4.t c4 ,tb5.t c5 ,tb6.t c6 ,tb7.t c7 ,tb8.t c8 ,tb9.t c9 ,tb10.t c10,tb11.t c11,tb12.t c12,tb13.t c13,tb14.t c14,tb15.t c15,tb16.t c16,tb17.t c17,tb18.t c18,tb19.t c19,tb20.t c20,tb21.t c21,tb22.t c22,tb23.t c23,tb24.t c24,tb25.t c25,tb26.t c26,tb27.t c27,tb28.t c28,tb29.t c29,tb30.t c30,tb31.t c31,tb32.t c32,tb33.t c33,tb34.t c34,tb35.t c35,tb36.t c36,tb37.t c37,tb38.t c38,tb39.t c39,tb40.t c40,tb41.t c41,tb42.t c42,tb43.t c43,tb44.t c44,tb45.t c45,tb46.t c46,tb47.t c47,tb48.t c48,tb49.t c49,tb50.t c50,tb51.t c51,tb52.t c52,tb53.t c53,tb54.t c54,tb55.t c55,tb56.t c56,tb57.t c57,tb58.t c58,tb59.t c59,tb60.t c60,tb61.t c61,tb62.t c62,tb63.t c63,tb64.t c64
from
tb tb1  cross join tb tb2 cross join tb tb3 cross join tb tb4 cross join tb tb5 cross join tb tb6 cross jo


Ïà¹ØÎĵµ£º

Sql Server ¶ÔxmlÀàÐ͵IJÙ×÷

 declare @XML XML
SET @XML='<root>
 <OLDVALUE>
  <H_Action id="1130">030</H_Action>
  <D_Action>030</D_Action>
  <OrderCompany>00220</OrderCompany>
  <OrderNumber>10004035</OrderNumber> ......

SQLÑ­»·Óï¾ä

SQLÑ­»·Óï¾ä
declare @i int
set @i=1
while @i<30
begin
insert into test (userid) values(@i)
set @i=@i+1
end
---------------
while Ìõ¼þ
begin
Ö´ÐвÙ×÷
set @i=@i+1
end
WHILE
ÉèÖÃÖØ¸´Ö´ÐÐ SQL Óï¾ä»òÓï¾ä¿éµÄÌõ¼þ¡£Ö»ÒªÖ¸¶¨µÄÌõ¼þÎªÕæ£¬¾ÍÖØ¸´Ö´ÐÐÓï¾ä¡£¿ÉÒÔʹÓà BREAK ºÍ CONTI ......

ÓÅ»¯µÄms sql server·ÖÒ³sqlÓï¾ä

ÓÅ»¯µÄms sql server·ÖÒ³sqlÓï¾ä
·¢²¼Ê±¼ä: 2009-8-15 00:00 |  ·¢²¼×÷Õß: hjh |   |  ²é¿´: 3´Î
ÌØµã£ºÒ»´Î²éѯ£¬Êý¾Ý¿âDatabnseÖ»·µ»ØÒ»Ò³µÄÊý¾Ý¡£¶ø·ñÔòÈ¡³öËùÓеÄÊý¾Ý¡£
˵Ã÷£º
pagesize£º ÿҳ³ÊÏּǼÊý
cureentpage£ºµ±Ç°Ò³Êý
select * from ( select TOP pagesize * from ( S ......

sql server 2005 µ¼³öÓû§±íÊý¾Ý×Öµä(×ªÔØ)

-----------------------------------------------------
--×÷ÓãºÓÃÓÚsql server 2005 µ¼³öÓû§±íÊý¾Ý×Öµä
--1 ĬÈϵ¼³öµ±Ç°Êý¾Ý¿âÖÐËùÓÐÓû§±í(xtype = 'u')µÄÊý¾Ý×ֵ䣻
--2 ¿ÉÒÔÔÚxtype = 'u'Ìæ»»ÎªÈçÏÂËùʾÓï¾äxtype = 'u' and name in ('son','Person') µ¼³ö×Ô¶¨ÒåµÄ±íµÄÊý¾Ý×ֵ䣻
--3 ¿ÉÒÔÀûÓü¯³É·þÎñSSISµ¼³ ......

Sql Server Á¬½ÓOracle µÄMSDTCÉèÖÃ

´ò¿ª“¹ÜÀí¹¤¾ß¨D¨D×é¼þ·þÎñ”£¬ÒÔ´Ë´ò¿ª“×é¼þ·þÎñ¨D¨D¼ÆËã»ú”£¬ÔÚ“ÎҵĵçÄÔ”Éϵã»÷ÓÒ¼ü¡£
ÔÚMSDTCÑ¡ÏÖУ¬µã»÷“°²È«ÅäÖÔ°´Å¥¡£
ÔÚ°²È«ÅäÖô°¿ÚÖÐ×öÈçÏÂÉèÖãº
 Ñ¡ÖÐ“ÍøÂçDTC·ÃÎÊ”
 ÔÚ¿Í»§¶Ë¹ÜÀíÖÐÑ¡ÖГÔÊÐíÔ¶³Ì¿Í»§¶Ë”“ÔÊÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ