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

ÇóSqlÓï¾äÒ»Ìõ - MS-SQL Server / »ù´¡Àà

Ò»¸ö±í a £¬×öÁËÒ»¸öa ±íµÄ ±¸·Ý È¡Ãû a_bak£¨×ֶζ¼ÊÇÏàͬµÄ£©¡£
ÏÖÔÚ ²»Ð¡ÐÄ°Ñ a ±íijһÌõ¼Ç¼¸øɾ³ýÁË£¬µ«ÊÇ Ò²²åÈë a_bak±íÖУ¬
ÏÖÔÚ ÈçºÎ°Ñ a_bak ±íÖÐÄÇÒ»Ìõ¼Ç¼ ÔÙ²åÈë a±íÖÐ....???
ÓÉÓÚa±íÖÐ µÄ×ֶηdz£µÄ¶à£¬

insert Ä¿±ê±íÃû£¨×Ö¶ÎÁÐ±í£© select ×Ö¶ÎÁбí from Ô´±íÃû where ¿½±´Ìõ¼þ 

×Ö¶ÎÁÐ±í ¾ÍҪд °ÑËùÓÐ×ֶζ¼Ð´½øÈ¥£¬
Õâ¸ö ·½·¨ ¾ÍÏԵñȽϸ´ÔÓ£¬ºÜÂé·³...

»¹ÓÐû ¸üºÃµÄ·½·¨£¿£¿£¿
¾ÍÓÃinsert into °É

²»ÓÃдÌõ¼þ insert a select * from a_bak where Ìõ¼þ

SQL code:

insert into b (id)
select id from a_back



ûÓиüºÃµÄ°ì·¨£¬²»¾Í²ÅÒ»Ìõ¼Ç¼Âð£¬Âé·³Ò²¾ÍÊÇÒ»´Î¡£

×îºÃµÄ·½·¨ÊÇ°ÑÄãÕýʽ±íɾ³ý£¬°Ñ±¸·Ý±íÈ«²¿¿½±´Ò»ÏÂÔÙ¸´ÖÆÒ»·Ý¾ÍÐУ¬´úÂ붼²»ÓÃд¡£

insert into

ÓÃÕâ¾äÏÔʾ³öËùÓеÄ×Ö¶ÎÃû
SQL code:
select name from syscolumns where id = object_id('a')

Ôٱ༭һϾͿÉÒÔÓÃÁË


Ïà¹ØÎÊ´ð£º

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

Êý¾ÝÒÔxml¸ñʽ·µ»Ø - MS-SQL Server / Ó¦ÓÃʵÀý

´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......

Ò»Ìõ SQL - Oracle / »ù´¡ºÍ¹ÜÀí

ÓÐÕâÑùÒ»ÌõSQL
 Select Get_Costtaxrate(col1), Get_Tcostvalue(col1) from a
 
ÆäÖÐGet_Costtaxrate¡¢Get_Tcostvalue¶¼ÊǺ¯Êý£¬ÕâÁ½¸öº¯ÊýÀïÃ涼ÊDzéÕÒÒ»¸ö´ó±í£¬Get_Tcostvalue»¹ÐèÒªµ÷ÓÃGet_C ......

sqlÓï¾äÎÊÌâ - MS-SQL Server / ÒÉÄÑÎÊÌâ

ÏÖÔÚÓÐÒ»¸ö²¿Ãűídept£¨²¿ÃÅÃû³Æ£¬²¿Ãźš£¡££©ÓÐÒ»¸öÈËÔ±±íemp£¨ÐÕÃû£¬ÈËÔ±±àºÅ£¬Ö°Î»£¬Ð½×Ê£¬²¿ÃÅ£©
emp±íÖеÄÄÚÈÝÊÇÕâÑùµÄ£º
a 1 ¹¤³Ìʦ 3000 Èí¼þ²¿
b 2 ÆÕͨԱ¹¤ 2000 Ó²¼þ²¿
c 3 ¹¤³Ìʦ 4000 Ó²¼þ²¿
d ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ