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

SQL Óï¾äΪ±íÔö¼Ó,ÐÞ¸Ä,ɾ³ýÁÐ

1.ÐÞ¸ÄÁÐ
    EXEC sp_rename 'TableName.ColumnName','NewColumName'
2.Ôö¼ÓÁÐ
    ALTER TABLE TableName ADD ColumnName int  --Type In Here
3.ɾ³ýÁÐ
    ALTER TABLE TableName DROP Column ColumnName


Ïà¹ØÎĵµ£º

Sql Server ¶ÔxmlÀàÐ͵IJÙ×÷

 declare @XML XML
SET @XML='<root>
 <OLDVALUE>
  <H_Action id="1130">030</H_Action>
  <D_Action>030</D_Action>
  <OrderCompany>00220</OrderCompany>
  <OrderNumber>10004035</OrderNumber> ......

SQL Server2005 xml×Ö¶ÎʹÓ÷½·¨ 1¶Ô¶à±í¼Ç¼¶ÁÈ¡

ÔÚSQL Server2005ÖÐÓÐFOR XML Ó÷¨£¬¿ÉÒÔ½²Ò»¸ö±í×÷Ϊһ¸ö×ֶΡ£
ÎÒµÄÉè¼ÆÏë·¨Ö÷ÒªÊÇÓÃÔÚ1¶Ô¶àµÄ¹ØϵÖбí¶ÁÈ¡µÄÎÊÌâ¡£
±íA ±íB
ÔÚAÖÐÓÐÒ»Ìõ¼Ç¼¶øÔÚBÖÐÓжàÌõ¼Ç¼¿ÉÒÔ²ÎÕÕÏÂÃæµÄд·¨£º£¨ÎÒµÄÏîÄ¿ÖÐÓõ½µÄ£¬ÐÞ¸ÄÁË×Ö¶ÎÖ÷ÒªÊÇÑÝʾÓã©
select A.*,
(SELECT a,  CAST(G_Univalence AS NVARCHAR(48)) AS G_Univa ......

¡¾×ª¡¿ ¡¾SQL¡¿ÐÐÁÐת»»

¡¾SQL¡¿ÐÐÁÐת»»
http://space.itpub.net/519536/viewspace-609167
Ò»¡¢ÁбäÐÐ
1.´´½¨²âÊÔ±ítest£¬²¢³õʼ»¯ÊµÑéÊý¾Ý
sec@ora10g> create table test (name_id varchar2(10), name varchar2(10));
sec@ora10g> insert into test values ('01','Andy1');
sec@ora10g> insert into test values ('01','Andy2'); ......

SQL ¶à±íÁªºÏ²éѯ

ºÜÉÙÓÃjoin£¬Õâ´Îѧѧ£¬²¢±¸ÍüÁ½ÆªÎÄÕ£¡
ת×Ô£ºhttp://hcx-2008.javaeye.com/blog/285661
Á¬½Ó²éѯ
ͨ¹ýÁ¬½ÓÔËËã·û¿ÉÒÔʵÏÖ¶à¸ö±í²éѯ¡£Á¬½ÓÊǹØϵÊý¾Ý¿âÄ£Ð͵ÄÖ÷ÒªÌص㣬ҲÊÇËüÇø±ðÓÚÆäËüÀàÐÍÊý¾Ý¿â¹ÜÀíϵͳµÄÒ»¸ö±êÖ¾¡£
ÔÚ¹ØϵÊý¾Ý¿â¹ÜÀíϵͳÖУ¬±í½¨Á¢Ê±¸÷Êý¾ÝÖ®¼äµÄ¹Øϵ²»±ØÈ·¶¨£¬³£°ÑÒ»¸öʵÌåµÄËùÓÐÐÅÏ¢´æ·ÅÔÚÒ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ