SQL server´¥·¢Æ÷ÈëÃÅ2 ÖØÃüÃû´¥·¢Æ÷
1.Óòéѯ·ÖÎöÆ÷ÖØÃüÃû
exec sp_rename ÔÃû³Æ, ÐÂÃû³Æ
sp_rename ÊÇ SQL Server™ ×Ô´øµÄÒ»¸ö´æ´¢¹ý³Ì£¬ÓÃÓÚ¸ü¸Äµ±Ç°Êý¾Ý¿âÖÐÓû§´´½¨µÄ¶ÔÏóµÄÃû³Æ£¬Èç±íÃû¡¢ÁÐ±í¡¢Ë÷ÒýÃûµÈ¡£
2.ÓÃÆóÒµ¹ÜÀíÆ÷ÖØÃüÃû
ÔÚ±íÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”£¬Ñ¡ÖÐËùÒªÖØÃüÃûµÄ´¥·¢Æ÷£¬Ð޸Ĵ¥·¢Æ÷Óï¾äÖеĴ¥·¢Æ÷Ãû³Æ£¬µã»÷“È·¶¨”¡£
Ïà¹ØÎĵµ£º
ÔÚ¸ø¸÷ºÏ×÷ѧУ°²×°Ó¦ÓÃϵͳ¹ý³ÌÖУ¬·¢ÏÖѧУÀïµÄSQL SERVER 2000Êý¾Ý¿âËð»µÁË֨װºó¶¼·¢ÉúÁËͬÑùµÄÎÊÌ⣬ÄǾÍÊǰ²×°SQL SERVERÊý¾Ý¿â²»³É¹¦¡£ÔÒò£º¼´Ê¹Äãͨ¹ý¿ØÖÆÃæ°åÀïµÄ“Ìí¼Ó/ɾ³ý³ÌÐò” Õý³£µÄÐ¶ÔØSQL SERVERÊý¾Ý¿â£¬µ«ÊÇ£¬SQL SERVER»¹ÊÇûÓÐÍêÈ«Ð¶ÔØ¸É¾»£¬»¹ÐèÒªÊÖ¹¤½øÐÐһЩ²Ù×÷¡£Òò´ËÖØÐ°²×°²»³É¹¦£¬º ......
¹úÍâ¿Õ¼äÃ²ËÆ¶ÔÖÐÎıȽϸÐð Èç¹ûÊý¾ÝÀàÐÍÉè¼ÆÎª varchar ÀàÐ͵ϰ ´æ´¢µÄÊý¾Ý»ù±¾ÉÏÊÇ "£¿£¿£¿£¿"
ºÜ¼òµ¥ ½« varchar ÀàÐÍ Éè¼ÆÎª nvarchar ÀàÐÍ
create table cs
(
txt1 nvarchar(50) null
)
insert into cs (txt1 ) values ('²âÊÔ') -- Èë¿âʱÊý¾Ýʱ £¿£¿£¿£¿
insert into cs (txt ......
SQL·ÖÒ³
ÍòÄÜ·ÖÒ³
.net´úÂë
select top ÿҳÏÔʾµÄ¼Ç¼Êý * from topic where id not in
(select top £¨µ±Ç°µÄÒ³Êý-1£©×ÿҳÏÔʾµÄ¼Ç¼Êý id from topic order by id desc)  ......
ÉϽÚÎÒÃǽéÉÜÁ˱íÁ¬½Ó£¬¸üÈ·ÇеÄ˵ÊÇinner joins內Á¬½Ó£®
¡¡¡¡內Á¬½Ó½öÑ¡³öÁ½ÕűíÖл¥ÏàÆ¥ÅäµÄ¼Ç¼£®Òò´Ë£¬Õâ»áµ¼ÖÂÓÐʱÎÒÃÇÐèÒªµÄ¼Ç¼ûÓаüº¬½øÀ´¡£
¡¡¡¡Îª¸üºÃµÄÀí½âÕâ¸ö¸ÅÄÎÒÃǽéÉÜÁ½¸ö±í×÷ÑÝʾ¡£ËÕ¸ñÀ¼Òé»áÖеÄÕþµ³±í(party)ºÍÒéÔ±±í(msp)¡£
party(Code,Name,Leader)
Code: Õþµ³´úÂë
Name: Õþµ³ ......
Orcale µÄSQL Óï¾äÈ¡µÃϵͳµ±Ç°Ê±¼äÓãºsysdate
µ±ÐèÒªÔÚϵͳµ±Ç°ÈÕÆÚÉϼõÈ¥Ò»Ììʱ¿ÉÒÔÓà sysdate-1
¸½£ºµ±Ö»¶ÔÒ»¶¨ÊýÁ¿µÄ¼Ç¼¸ÐÐËȤʱ¿ÉÒÔÈç rownum<100
select * from SLYC_CUSTINFO_T where indbtime>sysdate-1 and OFFICE_CODE='46' and rownum<1 ......