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

sql update Ó÷¨

½«b±íÖÐcallerÁеÄÖµ²åÈëa±íÖÐcallÁÐÖС£
 create table a
(
 fid int,
 call varchar(20),
 age int
)
create table b
(
 fid int,
 caller varchar(20),
 parentId int
)
select * from a
select * from b
insert into a values(1,null,19)
insert into a values(2,null,20)
insert into b values(1,'a',1)
insert into b values(2,'b',2)
update  a set call =b.caller from b inner join a on a.fid = b.parentId


Ïà¹ØÎĵµ£º

¹ØÓÚSQLÓï¾äµÄ×Ô¶¯Éú³É

ÔÚÎÒÃǵÄÈÕ³£±à³ÌÖУ¬Êý¾Ý¿âµÄ³ÌÐò»ù±¾É϶¼ÒªÓëSQLÓï¾ä´ò½»µÀ£¬SQLÓï¾äµÄ±àд²»¿É±ÜÃâµÄ³ÉΪһ¸öÍ·Ì۵Ť×÷¡£ÇÒÒòΪSQLÓï¾äÊÇSTRINGÀàÐÍ£¬Òò´ËÔÚ±àÒë½×¶Î²é²»³ö´í£¬Ö»Óе½ÔËÐÐʱ²ÅÄÜ·¢ÏÖ´íÎó¡£
±¾ÎĵĽâ¾ö·½°¸£¬Í¨¹ý×Ô¶¯Éú³ÉSQLÓï¾ä£¬ÔÚÒ»¶¨³Ì¶ÈÉϽµµÍ³ö´íµÄ¸ÅÂÊ£¬´Ó¶øÌá¸ß±à³ÌЧÂÊ¡£     public int ......

SQL²éѯ ÖØ¸´¼Ç¼

1¡¢²éÕÒ±íÖжàÓàµÄÖØ¸´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö×ֶΣ¨peopleId£©À´ÅжÏ
select * from people
where peopleId in (select   peopleId  from   people  group  by   peopleId  having  count(peopleId) > 1)
2¡¢É¾³ý±íÖжàÓàµÄÖØ¸´¼Ç¼£¬Öظ´¼Ç¼ÊǸù¾Ýµ¥¸ö× ......

sql 2000ºÍ2005 ¸´ÖÆÊý¾Ý ·¢²¼Óë¶©ÔÄ

2000·¢²¼Óë¶©ÔÄ
Ô¤±¸¹¤×÷
1.·¢²¼·þÎñÆ÷,¶©ÔÄ·þÎñÆ÷¶¼´´½¨Ò»¸öͬÃûµÄwindowsÓû§,²¢ÉèÖÃÏàͬµÄÃÜÂë,×öΪ·¢²¼¿ìÕÕÎļþ¼ÐµÄÓÐЧ·ÃÎÊÓû§
--¹ÜÀí¹¤¾ß
--¼ÆËã»ú¹ÜÀí
--Óû§ºÍ×é
--ÓÒ¼üÓû§
--н¨Óû§  
--½¨Á¢Ò»¸öÁ¥ÊôÓÚadministrator×éµÄµÇ½windowsµÄÓû§£¨SynUser£©
2.ÔÚ·¢²¼·þÎñÆ÷ÉÏ,н¨Ò»¸ö¹²ÏíĿ¼ ......

sql ±¸·ÝºÍɾ³ý

±¸·Ý
DECLARE @strPath NVARCHAR(200)
set @strPath = convert(NVARCHAR,getdate(),120)
set @strPath='hq'+rtrim(left(replace(@strPath,'-',''),8))
set @strPath = 'D:\sqlback\mydb\' + @strPath + '.bak'
BACKUP DATABASE [mydb] TO DISK = @strPath WITH NOFORMAT, NOINIT, NAME = N'mydb-ÍêÕû Êý¾Ý¿â ±¸·Ý', ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ