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

aspÁ´½ÓsqlÊý¾Ý¿â ´úÂë

 dim conn,connstr
Set conn = Server.CreateObject("ADODB.Connection")'´´½¨Ò»¸öÊý¾Ý¿âÁ´½Ó¶ÔÏóconn£¬·½±ãºóÃæµ÷ÓÃ
connstr="Provider=SQLOLEDB;Data Source=(local);Initial Catalog=111;User ID=sa;Password=1234;" '´´½¨Ò»¸öÊý¾Ý¿âµÄrecordset¶ÔÏ󣬷½±ãÒÔºóµ÷ÓÃ
conn.Open connstr'´ò¿ªÊý¾Ý¿â


Ïà¹ØÎĵµ£º

SQL Server2000 ½âÎöXML

DECLARE @HDOC INT --Îĵµ¾ä±ú
DECLARE @XMLSTRING VARCHAR(200) --XML×Ö·û´®
SET @xmlString ='<?xml version="1.0"?>
<ROOT>
<USER ID="1" Name="SBQCEL"/>
<USER ID="2" Name="PEACELI"/>
<USER ID="3" Name="SHEEPCHANG"/>
</ROOT>'
--ʹÓÃϵͳ´æ´¢ ......

SQLÁ¬½Ó²éѯ(»ã×Ü)

Ò»¡¢½»²æÁ¬½Ó£¨CROSS JOIN£©
½»²æÁ¬½Ó£¨CROSS JOIN£©£ºÓÐÁ½ÖÖ£¬ÏÔʽµÄºÍÒþʽµÄ£¬²»´øON×Ӿ䣬·µ»ØµÄÊÇÁ½±íµÄ³Ë»ý£¬Ò²½ÐµÑ¿¨¶û»ý¡£
ÀýÈ磺ÏÂÃæµÄÓï¾ä1ºÍÓï¾ä2µÄ½á¹ûÊÇÏàͬµÄ¡£
Óï¾ä1£ºÒþʽµÄ½»²æÁ¬½Ó£¬Ã»ÓÐCROSS JOIN¡£
SELECT O.ID, O.ORDER_NUMBER, C.ID, C.NAME
from ORDERS O , CUSTOMERS C
WHERE O.ID=1;
Óï¾ä2£ ......

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

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

ͨ¹ýSQL´úÂëÊÕËõÊý¾Ý¿â

 
/*------------------------------------------------------------------
--  Author : htl258(Tony)
--  Date   : 2010-04-16 14:30:23
--  Version: Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
    Jul  9 2008 14:43:34
  &nb ......

SQL »ñȡϵͳÎļþ

--»ñµÃµ±Ç°ËùÓÐÇý¶¯Æ÷
exec master.dbo.xp_availablemedia
--»ñµÃ×ÓĿ¼Áбí
exec master.dbo.xp_subdirs 'c:\'
--»ñµÃËùÓÐ×ÓĿ¼µÄĿ¼Ê÷½á¹¹
exec master.dbo.xp_dirtree 'c:\'
--¶©ÔÄÎļþɾ³ý
declare @tempTable table (Cont varchar(50))
declare @strTemp varchar(50)
declare @dirPath varchar(50)
declar ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ