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

ͨ¹ýSQL Server Agent·½Ê½ÊµÏÖÊý¾Ý¿â×Ô¶¯±¸·Ý£¡

--ÓÃJOB. 
--SQL SERVER2000ΪÀý 
ÆóÒµ¹ÜÀíÆ÷—>Êý¾Ý¿â·þÎñÆ÷—>¹ÜÀíĿ¼—>SQL SERVER´úÀí—>×÷Òµ—>ÓÒ¼ü Ñ¡—>н¨ 
³£¹æÑ¡ÏîÒ³—>ÊäÈë×÷ÒµÃû³Æ—>Ñ¡ÖÐËùÓÐÕß¡£ 
²½ÖèÑ¡ÏîÒ³—>н¨—>ÊäÈë²½ÖèÃû—>ÀàÐÍ TSQL½Å±¾—>Ñ¡ÔñÐèÒªÖ´ÐеÄÊý¾Ý¿â—>ÔÚÃüÁî¿òÀïÊäÈëÄãµÄSQL ½Å±¾£º
È磺Backup Database tedmdb To Disk='D:/test.bak'
Äã¿ÉÒÔµã×óϽǵġ¾·ÖÎö¡¿°´Å¥£¬·ÖÎöÒ»ÏÂÓï·¨£¬·ÖÎöÎÞÎ󣬰´È·¶¨¡£ 
µ÷¶ÈÑ¡ÏîÒ³—>н¨µ÷¶È—>ÊäÈëµ÷¶ÈÃû³Æ—>µ÷¶ÈÀàÐÍ Äã¿ÉÒÔÑ¡ÔñÒ²¿ÉÒÔµãÓÒϽǵġ¾¸ü¸Ä¡¿°´Å¥½øÐиü¸Ä£¬È·¶¨¡£ 
ÈÎÎñÀ¸ SQL SERVER·þÎñÆ÷µÄСͼ±ê Ë«»÷ ·þÎñ Ñ¡ÖÐ SQL SERVER AGENT,µã¡¾¿ªÊ¼/¼ÌÐø¡¿£¬Ñ¡Öе±Æô¶¯OSʱ£¬×Ô¶¯Æô¶¯·þÎñ£¬¾Í¿ÉÒÔÁË¡£ 
µ½Ä㶨µÄÄǸöʱ¼äµã£¬SQL SERVER»á×Ô¶¯È¥Ö´ÐÐÄãµÄ½Å±¾µÄ¡£ 
Èç¹ûÐèÒªÉú³É½Å±¾µÄ»°£¬ÆóÒµ¹ÜÀíÆ÷—>Êý¾Ý¿â·þÎñÆ÷—>¹ÜÀíĿ¼—>SQL SERVER´úÀí—>×÷Òµ—>ÓÒ¼üÄã¸ÕÍê³ÉµÄ×÷Òµ—>ËùÓÐÈÎÎñ 
—>Éú³ÉSQL½Å±¾£¬¼´¿ÉÉú³ÉÄãÐèÒªµÄ½Å±¾¡£
´úÂ룺
 -- Script generated on 2009-10-16 14:56
-- By: sa
-- Server: (LOCAL)
BEGIN TRANSACTION           
  DECLARE @JobID BINARY(16) 
  DECLARE @ReturnCode INT   
  SELECT @ReturnCode = 0    
IF (SELECT COUNT(*) from msdb.dbo.syscategories WHERE name = N'Database Maintenance') < 1
  EXECUTE msdb.dbo.sp_add_category @name = N'Database Maintenance'
  -- Delete the job with the same name (if it exists)
  SELECT @JobID = job_id    
  from   msdb.dbo.sysjobs   
  WHERE (name = N'db_auto_backup_test')      
  IF (@JobID IS NOT NULL)   
  BEGIN 
  -- Check if the job is a multi-server job 
  IF (EXISTS (SELECT  *
       


Ïà¹ØÎĵµ£º

MySQL ×Ö·û¼¯µ¼ÖÂSQLÁ¬½ÓÖ®ºóÖÐÎÄÂÒÂëµÄÎÊÌ⣡

character-set-server = GB2312
collation-server = latin1_general_ci
MySQL×Ö·û¼¯ GBK¡¢GB2312¡¢UTF8Çø±ð ½â¾ö MYSQLÖÐÎÄÂÒÂëÎÊÌâ ÊÕ²Ø
MySQLÖÐÉæ¼°µÄ¼¸¸ö×Ö·û¼¯
character-set-server/default-character-set£º·þÎñÆ÷×Ö·û¼¯£¬Ä¬ÈÏÇé¿öÏÂËù²ÉÓõġ£
character-set-database£ºÊý¾Ý¿â×Ö·û¼¯¡£
character-set-table£ºÊ ......

½«accessµ¼ÈëSQL server

Ò»¡¢SQL SERVER ºÍACCESSµÄÊý¾Ýµ¼Èëµ¼³ö
³£¹æµÄÊý¾Ýµ¼Èëµ¼³ö£º
ʹÓÃDTSÏòµ¼Ç¨ÒÆÄãµÄAccessÊý¾Ýµ½SQL Server£¬Äã¿ÉÒÔʹÓÃÕâЩ²½Öè:
¡¡¡¡¡ð1ÔÚSQL SERVERÆóÒµ¹ÜÀíÆ÷ÖеÄTools£¨¹¤¾ß£©²Ëµ¥ÉÏ£¬Ñ¡ÔñData Transformation
¡¡¡¡¡ð2Services£¨Êý¾Ýת»»·þÎñ£©£¬È»ºóÑ¡Ôñ  czdImport Dat ......

ÔÚsqlÖвéѯ±íÖгýÁËijЩÁÐÖ®ÍâµÄÁеÄÐÅÏ¢

declare @str varchar(8000),@sql varchar(8000)
set @str=''
select @str=@str+','+name from syscolumns WHERE ID=OBJECT_ID('±íÃû') AND NAME!='ÒªÅųýµÄÁÐÃû'
set @str=stuff(@str,1,1,'')
set @sql='select '+@str+' from ±íÃû'
exec (@sql) ......

ɾ³ýSQLÊý¾Ý¿âÖÐÏàͬ¼Ç¼µÄSQLÓï¾ä

ÍøÕ¾Êý¾Ý¿âÖÖÂí
Êý¾Ý¿âÖкܶà±í´æÔÚ´óÁ¿Ïàͬ¼Ç¼
¾­¸ßÈËÖ¸µãɾ³ýÏàͬ¼Ç¼(½ö±£ÁôÒ»¸ö)µÄSQLÓï¾äÈçÏÂ
declare @tmptb TABLE (
 [ID] [int] NOT NULL ,
 [SortName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
 [SortNote] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
 [ParentI ......

SQL³£±¸ÖªÊ¶


1¡¢SQLÂß¼­²éѯ´¦ÀíÖеĸ÷¸ö½×¼¶Ë³Ðò
      (8)SELECT (9) DISTINCT (11) <tOP_Specification> <select list>
      (1)from¡¡£¼Left tables£¾
      (3)<Join type>Join<Right_table>
 &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ