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

SQL´æ´¢¹ý³Ì²âÊÔ£¨5£©——´ÓT

ÎÊÌâ
      ÈçºÎÈÃT-SQL²âÊÔÌ×¼þ°Ñ²âÊÔÓÃÀý½á¹ûÖ±½ÓдÈëÎı¾Îļþ
Éè¼Æ
      ʹÓÃActiveX¼¼ÊõʵÀý»¯Ò»¸öFileSystemObject¶ÔÏó£¬È»ºóͨ¹ýOpenTextFile()ºÍWriteLine()·½·¨Ö±½Ó°Ñ²âÊÔ½á¹ûдÈëÎļþ¡£
·½°¸
declare @fsoHandle int,@fileID int
exec sp_OACreate 'Scripting.FileSystemObject',@fsoHandle out
exec sp_OAMethod @fsohandle,'OpenTextFile',@fileID out,
    'C:\pathToResults\Results.txt',8,1
——Ö÷²âÊÔÑ­»·
if(@result = @expected)
    exec sp_OAMethod @fileID,'WriteLine',null,'Pass'
else
    exec sp_OAMethod @fileID,'WriteLine',null,'FAIL'
——Ö÷²âÊÔÑ­»·½áÊø
exec sp_OADestroy @fileID
exec sp_OADestroy @fsoHandle
      ÎÒÃÇÐèÒªÓÐÒ»¸öÎļþ¾ä±úºÍÒ»¸öÎļþID£¬ËüÃǵÄÀàÐͶ¼ÊÇInt£¬SQL ServerÓÐÒ»¸ö×÷sp_OACreate()µÄ´æ´¢¹ý³Ì¿ÉÒÔʵÀý»¯ActiveX¶ÔÏó¡£sp_OACreate()½ÓÊÜÒ»¸ö×Ö·û´®×÷Ϊ´«ÈëµÄ²ÎÊý£¬Õâ¸ö×Ö·û´®¾ÍÊÇÒª´´½¨µÄActiveX¶ÔÏóµÄÃû×Ö£¬²¢ÇÒÒÔout²ÎÊýµÄÐÎʽ·µ»ØÒ»¸öÒÑ´´½¨¶ÔÏóµÄÒýÓã¬Õâ¸öÒýÓõÄÀàÐÍÊÇint¡£¶ÔÓÚScripting.FileSystemObjectµÄÇé¿öÀ´Ëµ£¬·µ»ØÖµÊǹØÓÚÎļþ¾ä±úµÄÒ»¸öÒýÓ᣽ÓÏÂÀ´£¬¿ÉÒÔͨ¹ýµ÷ÓÃsp_OAMethod()·½·¨´ò¿ªÎļþ¡£ÔÚ±¾ÀýÖУ¬µÚÒ»¸ö²ÎÊýÊÇsp_OACreate()°Ñ´´½¨µÄ¾ä±ú£¬µÚ¶þ¸ö²ÎÊýÊÇÎÒÃÇÏëҪʹÓõķ½·¨µÄÃû³Æ£¬µÚÈý¸ö²ÎÊýÊÇÓÃÓÚ±£´æ·µ»ØµÄÎļþ¾ä±úµÄ±äÁ¿£¬µÚËĸö²ÎÊýÖ¸¶¨ÎļþµÄÎïÀíÃû³Æ£¬µÚÎå¸ö²ÎÊýÊÇ¿ÉÑ¡µÄ£¬ËüÖ¸¶¨Ê¹ÓõÄIOģʽ¡£
      1£ºÒÔÖ»¶Á·½Ê½´ò¿ªÎļþ£¨Ä¬ÈÏ£©¡£
      2£ºÒÔд·½Ê½´ò¿ªÎļþ¡£
      3£ºÒÔ×·¼Ó·½Ê½´ò¿ªÎļþ
      µÚÁù¸ö²ÎÊýÊÇ¿ÉÑ¡µÄ£¬ËüÊÇÒ»¸ö´´½¨±êʶ£¬ÓÃÀ´Ö¸¶¨µ±¸ø¶¨Îļþ²»´æÔÚµÄʱºòÊÇ·ñ´´½¨Ò»¸öеÄÎļþ¡£
      0£º²»´´½¨ÐÂÎļþ£¨Ä¬ÈÏ£©¡£
      1£º´´½¨Ò»¸öÐÂÎļþ¡£
      µÚ°Ë¸öº¦ÊýÒ²ÊÇ¿ÉÑ¡µÄ£¬ËüÊÇÒ»¸ö¸ñʽ±êʶ£¬ÓÃÀ´Ö¸¶¨×Ö·ûµÄ±àÂ뷽ʽ¡£
      0£ºÒÔASCII·½Ê½´ò¿ªÎļþ£¨Ä¬ÈÏ£©¡£
      1£ºÒÔUnicode·½Ê½´ò¿ªÎļþ¡£
   


Ïà¹ØÎĵµ£º

SQLÊý¾Ý¿â

1.      ´æ´¢¹ý³Ì(¶¨Òå&±àд)
l  ´´½¨´æ´¢¹ý³Ì
CREATE PROCEDURE storedproc1
AS
SELECT *
from tb_project
WHERE  Ô¤¼Æ¹¤ÆÚ<= 90
ORDER BY  Ô¤¼Æ¹¤ÆÚ DESC
GO
exec storedproc1
GO
 
l   Ð޸Ĵ洢¹ý³Ì
ALTER PROCEDURE storedproc1
AS
SEL ......

ά»¤SQL serverµÄ28¸öСÎÊÌâ

1.ÈçºÎ´´½¨Êý¾Ý¿â
CREATE DATABASE student
2.ÈçºÎɾ³ýÊý¾Ý¿â
DROP DATABASE student
3.ÈçºÎ±¸·ÝÊý¾Ý¿âµ½´ÅÅÌÎļþ
BACKUP DATABASE student to disk=´c:S4.bak´
4.ÈçºÎ´Ó´ÅÅÌÎļþ»¹Ô­Êý¾Ý¿â
RESTORE DATABASE studnet from DISK = ´c:S4.bak´
5.ÔõÑù´´½¨±í£¿
CREATE TABLE Students (
&n ......

phpmyadmin ÐÞ¸ÄÖ´ÐÐsqlÎļþ´óСÏÞÖÆ

phpmyadmin ÐÞ¸ÄÖ´ÐÐsqlÎļþ´óСÏÞÖÆ
´ò¿ªphp.ini
post_max_size = 100M       ; ±íµ¥Ìá½»Îļþ´óСÉÏÏÞ
memory_limit = 128M    ; ÄÚ´æÉÏÏÞ
upload_max_filesize = 100M ; ÉÏ´«Îļþ´óСÉÏÏÞ
ÐÞ¸ÄÒÔÉÏÈýÏ¾Í¿ÉÒÔ½â¾ö¡£ µ«ÊÇ´ËʱPHPMYADMINÖÐ×î´óÏÞÖÆ£º22,528 KB£¬ ......

SQL Server CLRÈ«¹¦ÂÔÖ®Ò»

      Microsoft SQL Server ÏÖÔھ߱¸Óë Microsoft Windows .NET Framework µÄ¹«¹²ÓïÑÔÔËÐÐʱ (CLR) ×é¼þ¼¯³ÉµÄ¹¦ÄÜ¡£CLR ΪÍйܴúÂëÌṩ·þÎñ£¬ÀýÈç¿çÓïÑÔ¼¯³É¡¢´úÂë·ÃÎÊ°²È«ÐÔ¡¢¶ÔÏóÉú´æÆÚ¹ÜÀíÒÔ¼°µ÷ÊԺͷÖÎöÖ§³Ö¡£¶ÔÓÚ SQL Server Óû§ºÍÓ¦ÓóÌÐò¿ª·¢ÈËÔ±À´Ëµ£¬CLR ¼¯³ÉÒâζ×ÅÄúÏÖÔÚ¿ÉÒÔʹÓÃÈκ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ