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
Ïà¹ØÎĵµ£º
int object_id('objectname');
´Ë·½·¨·µ»ØÊý¾Ý¿â¶ÔÏó±êʶºÅ¡£
ÆäÖУ¬²ÎÊýobjectname ±íʾҪʹÓõĶÔÏ󣬯äÊý¾ÝÀàÐÍΪnchar»òchar£¨Èç¹ûΪchar£¬ÏµÍ³½«Æäת»»Îªnchar£©
·µ»ØÀàÐÍΪint£¬±íʾ¸Ã¶ÔÏóÔÚϵͳÖеıàºÅ¡£
±ÈÈ磺
use wf_timesheet
select object_id('usp_check_excess_hours')
·µ»ØÎª197575742¡£
´Ë· ......
ÆäʵÔÚÐÞ¸ÄÊý¾Ý¿âÃû³ÆÖ®Ç°£¬Èç¹ûÓÐÓû§Á¬½Óµ½Êý¾Ý¿âµÄ»°»áÔì³ÉÊý¾Ý¿âÖØÃüÃûʧ°Ü£¬¿ÉÒÔÏÈÖ´ÐÐ
select spid
from master.dbo.sysprocesses
where dbid=db_id('OldDbName')
½á¹û¼¯ÖÐÏÔʾµÄÊǵ±Ç°Á¬½Óµ½Êý¾Ý¿âOldDbNameµÄÁ¬½Ó
±ÈÈç½á¹ûÊÇ
79
81
µ±È»£¬Êµ¼ÊÖµÓ¦¸Ã²»ÊÇÕâÁ½¸ö
È»ºóÖ´ÐÐ
kill 79
kill 81
¹Ø±ÕÒѽ¨Á¢ ......
ÒòÏÖÔڵŤ×÷ÐèÒª£¬
ÎҵôÓWinFormµÄƽ̨£¬
תÐ͵½WebFormµÄÒ³Ãæ¡£
ÓÐÒ»Äê¶àûÓнӴ¥SQL ServerÁË£¬
ËäÈ»´óѧʱÓеã»ù´¡£¬
µ«Ò²Íü¼ÇµÃ²î²»¶àÁË¡£
ÒòΪAsp.netÐ͵ÄB/SÍøÕ¾ºÍWinFormµÄ»¹ÊÇÓе㲻ͬ£¬
ÏÖÔÚ¹¤×÷ÆðÀ´²»ÊÇÄÇôµÃÐÄÓ¦ÊÖ¡£
ιʶøÖªÐ£¬
¾Í°ÑÒÔǰʵϰʱ×öµÄµÄÍøÕ¾Ô´´úÂëÄóöÀ´¿´¿´¡£
ÒòΪҪÓõ½SQL 2005S ......