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

Sqlº¯Êý´óÈ«

---·µ»Ø±í´ïʽÖÐÖ¸¶¨×Ö·ûµÄ¿ªÊ¼Î»ÖÃ
select charindex('c','abcdefg',1)
---Á½¸ö×Ö·ûµÄÖµÖ®²î
select difference('bet','bit')
---×Ö·û×î×ó²àÖ¸¶¨ÊýÄ¿
select left('abcdef',3)
---·µ»Ø×Ö·ûÊý
select len('abcdefg')
--ת»»ÎªÐ¡×Ö·û
select lower('ABCDEFG')
--È¥×ó¿Õ¸ñºó
select ltrim('     abcdef')
---·µ»ØÖ¸¶¨µÚÒ»´Î³öÏֵĿªÊ¼Î»ÖÃ
select patindex('%_cd%','abcdef')
---Ìæ»»
select replace('abcdef','cd','xx')
---Ìæ»»¶à¸ö×Ö·û
select replace(replace('@22"33"','@',''),'"','')
--Öظ´±í´ïʽ
select replicate('abc',4)
---ÄæÏò±í´ïʽ
select reverse('abc')---cba
--·µ»ØÓÒ²àÖ¸¶¨ÊýÄ¿
select right('abcd',2)
---È¥ÓÒ¿Õ¸ñ
select rtrim('abcd    ')
---soundex´úÂë
select soundex('abd')
--¿Õ¸ñ×Ö·û´®
select space(1)
---ת»»×Ö·û´®
select str(100)
---ɾ³ýÖ¸¶¨³¤¶È×Ö·û,²¢°ÑÖ¸¶¨Æðµã²åÈëÁíÒ»×Ö·û
select stuff('abcdef',2,4,'xxx')
---½ØÈ¡×Ö·û
select substring('abcdef',2,3)
---ת»»´óд
select upper('abc')


Ïà¹ØÎĵµ£º

SQL ServerÖÐDateTime¸ñʽת»»

SQLʹÓÃconvertÀ´È¡µÃdatetimeÈÕÆÚÊý¾Ý£¬ÒÔÏÂʵÀý°üº¬¸÷ÖÖÈÕÆÚ¸ñʽµÄת»»,
¿ÉÒÔͨ¹ý²éѯÓï¾ä¼°²éѯ½á¹ûÀ´ÏÔʾ²»Í¬µÄ¸ñʽ£¬Èç¹ûÊÇDate¸ñʽҲ¿ÉÒÔÓãº
Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM
Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06
Select CONVERT(varchar(100), GETDATE(), 2 ......

SQLÃæÊÔÌ⣨תÔØ£©

SQLÃæÊÔÌ⣨1£©
create table testtable1
(
id int IDENTITY,
department varchar(12)
)
select * from testtable1
insert into testtable1 values('Éè¼Æ')
insert into testtable1 values('Êг¡')
insert into testtable1 values('ÊÛºó')
/*
½á¹û
id department
1   Éè¼Æ
2   Êг¡
3& ......

½â¾öÊý¾ÝÄÚÓÐ'µÄsqlÓï¾ä

SELECT OrderId, TableName, replace(PrimaryKeyColumn,'''','''''') as PrimaryKeyColumn, ColumnState,cast(IsUpdating as varchar) as IsUpdating, OperateTime, ValueColumn, SystemTypeID from SubCompFtpDataDairy where OperateTime>=dateadd(hh,-24,getdate()) ......

SQL Serer´úÀí·þÎñÊý¾Ý¿â

SQL Serer´úÀí·þÎñ
¶ÔÓÚÒ»¸öSQL Serverϵͳ¹ÜÀíÔ±À´Ëµ£¬ËûÿÌ춼ÃæÁÙ×ÅÐí¶à²»Í¬µÄÈÎÎñÀ´Ö´ÐУ¬ÀýÈç¼ì²éÒ»¸ö»ò¶à¸ö·þÎñÆ÷£¬µ÷½ÚºÍÓÅ»¯Êý¾Ý¿âµÄÐÔÄÜ£¬ÐÞ¸ÄÊý¾Ý¿âµÄ²¼¾ÖÉè¼ÆºÍÊý¾Ý¿â±í£¬Âú×ãÏÖÔںͽ«À´µÄÐèÒª,RAID1¡£Ò»°ãÀ´Ëµ£¬±£³ÖÊý¾Ý¿âÔÚËùÓй¤×÷ʱ¼äÄܹ»×îÓÅ»¯µÄÖ´ÐÐÊÇϵͳ¹ÜÀíÔ±µÄÄ¿±ê£¬ÎªÁË´ïµ½Õâ¸öÄ¿±ê£¬ÏµÍ³¹ÜÀíÔ±±ØÐ ......

Asp.netÓëSQLÒ»Æð´ò°ü²¿Êð°²×°


Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵ģ¬¶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ