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

sqlÓï¾ä

select gztzid,
       gztztt,
       gztzbt,
       gztznr,
       fslxmc,
       decode(fsfs, '0', 'ÎÞÐè»Ø¸´', '1', 'ÐèÒª»Ø¸´') fsfs,
       fssx,
       mjmc,
       fsr,
       qfr,
       fstzsj,
       xjtzsj,
       tzztdm
from t_zs_gztz
where gztzid ='3'
*********************************************************************
select distinct gztzid,gztzbt,gztztt,fsfs,fssx,tzztdm,tt
from (select distinct t.gztzid, t.gztzbt, t.gztztt, t.fsfs, t.fssx, t.tzztdm, w.hfdwdm,
decode(t.tzztdm,0,'´ý·¢ËÍ',1,decode(w.hfdwdm,'','δ»Ø¸´','Òѻظ´')) tt
from t_zs_gztz t, t_Zs_Gztzhf w
where t.gztzid = w.gztzid(+))
select * from t_Zs_Gztzhf t where t.gztzid='1'
select distinct gztzid,gztzbt,gztztt,fsfs,fssx,tzztdm,tt
from (select distinct t.gztzid, t.gztzbt, t.gztztt, t.fsfs, t.fssx, t.tzztdm, w.hfdwdm,
decode(w.hfdwdm,'','δ»Ø¸´','Òѻظ´') as tt
from t_zs_gztz t, t_Zs_Gztzhf w
where t.gztzid = w.gztzid(+) and t.tzztdm='1') where tt='Òѻظ´'
select distinct gztzid,gztzbt,gztztt,fsfs,fssx,tzztdm,tt
from (select distinct t.gztzid, t.gztzbt, t.gztztt, t.fsfs, t.fssx, t.tzztdm, w.hfdwdm,
decode(t.tzztdm,0,'´ý·¢ËÍ',1,decode(w.hfdwdm,'','δ»Ø¸´','Òѻظ´')) as tt
from t_zs_gztz t, t_Zs_Gztzhf w
where t.gztzid = w.gztzid(+)) where tt='´ý·¢ËÍ'
select distinct gztzid,gztzbt,gztztt,fsfs,fssx,tzztdm,tt
from (select distinct t.gztzid, t.gztzbt, t.gztztt, t.fsfs, t.fssx, t.tzztdm, w.hfdwdm,
decode(t.tzztdm,0,'´ý·¢ËÍ',1,decode(w.hfdwdm,'','δ»Ø¸´','Òѻظ´')) as tt
from t_zs_gztz t, t_Zs_Gztzhf w
where t.gztzid = w.gztzid(+) ) order by fssx desc
select distinct gztzid,gztzbt,gztztt,fsfs,fssx,tzztdm,tt
fr


Ïà¹ØÎĵµ£º

SQL 2005ת»»³É2000 (SQL Server)


Ö±½Órestore»ò¸½¼ÓÓ¦¸ÃÊDz»ÐеÄ, Óýű¾+µ¼Êý¾Ý¿Ï¶¨Ã»ÓÐÎÊÌâ¡£
2005תµ½2000µÄ²½Öè
1. Éú³Éfor 2000°æ±¾µÄÊý¾Ý¿â½Å±¾
2005 µÄmanger studio
-- ´ò¿ª"¶ÔÏó×ÊÔ´¹ÜÀíÆ÷"(ûÓеĻ°°´F8), Á¬½Óµ½ÄãµÄʵÀý
-- ÓÒ¼üҪתµ½2000µÄ¿â
-- ÈÎÎñ
-- Éú³É½Å±¾
-- ÔÚ"½Å±¾Ïòµ¼"µÄ"Ñ¡ÔñÊý¾Ý¿â"ÖÐ, ......

ʵÓÃSQL語¾ä

http://blog.csdn.net/fenglibing/archive/2007/10/24/1841537.aspx
1¡¢½«Ò»¸ö±íÖеÄÄÚÈÝ¿½±´µ½ÁíÍâÒ»¸ö±íÖÐ
insert into testT1(a1,b1,c1) select a,b,c from test;
insert into testT select * from test; (Ç°ÌáÊÇ兩個±íµÄ結構ÍêÈ«Ïàͬ)
 
insert into notebook(id,title,content)
se ......

SQL´æ´¢¹ý³Ì²âÊÔ£¨5£©——´ÓT

ÎÊÌâ
      ÈçºÎÈÃT-SQL²âÊÔÌ×¼þ°Ñ²âÊÔÓÃÀý½á¹ûÖ±½ÓдÈëÎı¾Îļþ
Éè¼Æ
      ʹÓÃActiveX¼¼ÊõʵÀý»¯Ò»¸öFileSystemObject¶ÔÏó£¬È»ºóͨ¹ýOpenTextFile()ºÍWriteLine()·½·¨Ö±½Ó°Ñ²âÊÔ½á¹ûдÈëÎļþ¡£
·½°¸
declare @fsoHandle int,@fileID int
exec sp_OACreate 'Scr ......

sql È«ÎÄË÷Òý

1¡¢ÒªÆôÓÃÈ«ÎÄË÷Òý¹¦ÄÜÊ×ÏÈÐèÒª°²×°full text searchÈ«ÎÄË÷Òý·þÎñ
2¡¢Æô¶¯full text search·þÎñ
3¡¢ÏÈ´´½¨UniqueË÷ÒýºÍÈ«ÎÄË÷Òý£ºCREATE FULLTEXT INDEX ON table_name
4¡¢Ã¿¸ö±íÖ»ÔÊÐí´´½¨Ò»¸öÈ«ÎÄË÷Òý
ɾ³ýÈ«ÎÄË÷Òý DROP FULLTEXT INDEX ON table_name
È«ÎÄËÑË÷Óï¾ä£¬contains(),freeText()
×¢ ......

SQLÓï¾äЧÂÊÎÊÌâµÄ¼¸µã×ܽá

1. SQLÓÅ»¯µÄÔ­ÔòÊÇ£º
  ½«Ò»´Î²Ù×÷ÐèÒª¶ÁÈ¡µÄBLOCKÊý¼õµ½×îµÍ,¼´ÔÚ×î¶ÌµÄʱ¼ä´ïµ½×î´óµÄÊý¾ÝÍÌÍÂÁ¿¡£  
  µ÷Õû²»Á¼SQLͨ³£¿ÉÒÔ´ÓÒÔϼ¸µãÇÐÈ룺  
  ¼ì²é²»Á¼µÄSQL£¬¿¼ÂÇÆäд·¨ÊÇ·ñ»¹ÓпÉÓÅ»¯ÄÚÈÝ  
  ¼ì²é×Ó²éѯ   ¿¼ÂÇSQL×Ó²éѯÊÇ·ñ¿ÉÒÔÓüòµ¥Á¬½Óµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ