¹ØÓÚдSQLÓï¾ä
Çë½Ì¸ßÊÖÒ»¸öÎÊÌ⣬ÎÊÌâÃèÊöÈçÏ£º
A±íÊǸ÷¸öµ¥Î»µÄÃû³Æ±í ×Ö¶ÎΪ org_id ºÍ org_name
B±íÊÇÕâЩµ¥Î»µÄµç»°ºÅÂë±í ×Ö¶ÎΪ org_idºÍ tel
A±í B±í¹ØÁª·½Ê½ÎªA.ORG_ID=B.ORG_ID
org_idÊǸ÷¸öµ¥Î»µÄ´úÂë
org_nameÊǸ÷¸öµ¥Î»µÄÃû³Æ
telÊǸ÷¸öµ¥Î»µÄµç»°ºÅÂë
±¾ÈËÏÖÔÚÏëÕë¶Ôÿ¸öµ¥Î»£¨Ã¿Ìõorg_id£©È¡Æä10¸öºÅÂë
ÇëÎÊ Óï¾äÓ¦ÈçºÎд£¿
Ïà¹ØÎĵµ£º
ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......
DECLARE @sql varchar(8000)
--ÏÂÃæÊÇɾ³ý15ÌìÇ°±¸·ÝÎļþµÄ´¦Àí
set @sql='Del E:\Databasebackup\'
@sql=@sql +rtrim(convert(varchar,getdate()-15,112))+'.bak'
Exec master..xp_cmdshell @sql
DECLARE @DelFile Varchar(256)
set ......
Àý×Ó£ºÕÒ³öÿ¸ö¸èÊÖÏúÁ¿×î¸ßµÄ3Ê׸è
create table singer_info
(
id int primary key identity(1,1),
name varchar(20),
song varchar(20),
amount int
)
insert into singer_info values('jay','aaa',1000)
insert into singer_info values('jay','bbb',2000)
insert into singer_info values('jay','cc ......
Èí¼þÊÇÃâ·ÑʹÓõģ¬×Ô¼º¹¤×÷ÖÐÒ²Ò»Ö±Óã¬Óкܶ๦ÄÜÏëÔö¼Ó£¬ÓÉÓÚʱ¼äÔÒòûȥÕûÀíÐèÇó¡£×Ô´ÓÈ¥Äê·¢²¼V1.0.0°æºóûÓÐÔÚ·¢²¼ÁË£¬±¾´ÎÖ÷ÒªÊÇÔö¼ÓÁ˽âÃÜOracle10g¼ÓÃܶÔÏñµÄ¹¦ÄÜ£¬ÁíÍâ×öÁËһЩСµÄÓÅ»¯£¬·¢ÉÏÀ´Óë´ó¼Ò·ÖÏíһϣ¬ÒòΪÊÇBeta°æ£¬ËùÒÔÒ²Çë´ó¼ÒÁ½⣬Èç¹ûÔÚʹÓýâÃܹ¦ÄÜʱÓöµ½ÎÊÌâ¿ÉÒÔ·¢E ......
TRUNCATE TABLE ÔÚ¹¦ÄÜÉÏÓë²»´ø Where ×Ó¾äµÄ Delete
Óï¾äÏàͬ£º¶þÕß¾ùɾ³ý±íÖеÄÈ«²¿ÐС£µ« TRUNCATE TABLE ±È Delete Ëٶȿ죬ÇÒʹÓõÄϵͳºÍÊÂÎñÈÕÖ¾×ÊÔ´ÉÙ¡£
Delete
Óï¾äÿ´Îɾ³ýÒ»ÐУ¬²¢ÔÚÊÂÎñÈÕÖ¾ÖÐΪËùɾ³ýµÄÿÐмǼһÏî¡£TRUNCATE TABLE ͨ¹ýÊÍ·Å´æ´¢±íÊý¾ÝËùÓõÄÊý¾ÝÒ³À´É¾³ýÊý¾Ý£¬²¢ÇÒÖ»ÔÚÊÂÎñÈÕÖ¾ÖмÇÂ¼Ò ......