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

sqlº¯Êý

1:replace º¯Êý
µÚÒ»¸ö²ÎÊýÄãµÄ×Ö·û´®£¬µÚ¶þ¸ö²ÎÊýÄãÏëÌæ»»µÄ²¿·Ö£¬µÚÈý¸ö²ÎÊýÄãÒªÌæ»»³Éʲô
select replace('lihan','a','b')
                                                                  
-----------------------------
lihbn
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
=========================================================
2:substringº¯Êý
µÚÒ»¸ö²ÎÊýÄãµÄ×Ö·û´®£¬µÚ¶þ¸öÊÇ¿ªÊ¼Ì滻λÖ㬵ÚÈý¸ö½áÊøÌæ»»Î»ÖÃ
select substring('lihan',0,3);
-----
li
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
=========================================================
3:charindexº¯Êý
µÚÒ»¸ö²ÎÊýÄãÒª²éÕÒµÄchar£¬µÚ¶þ¸ö²ÎÊýÄã±»²éÕÒµÄ×Ö·û´® ·µ»Ø²ÎÊýÒ»ÔÚ²ÎÊý¶þµÄλÖÃ
select  charindex('a','lihan')
-----------
4
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
===========================================================
4£ºASCIIº¯Êý
·µ»Ø×Ö·û±í´ïʽÖÐ×î×ó²àµÄ×Ö·ûµÄ ASCII ´úÂëÖµ¡£
select ASCII('lihan')
-----------
108
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
================================================================
5£ºncharº¯Êý
¸ù¾Ý Unicode ±ê×¼µÄ¶¨Ò壬·µ»Ø¾ßÓÐÖ¸¶¨µÄÕûÊý´úÂëµÄ Unicode ×Ö·û¡£
²ÎÊýÊǽéÓÚ 0 Óë 65535 Ö®¼äµÄÕýÕûÊý¡£Èç¹ûÖ¸¶¨Á˳¬³ö´Ë·¶Î§µÄÖµ£¬½«·µ»Ø NULL¡£
select nchar(3213)
----
unicode×Ö·û
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
=========================================================
6£ºsoundex
·µ»ØÒ»¸öÓÉËĸö×Ö·û×é³ÉµÄ´úÂë (SOUNDEX)£¬ÓÃÓÚÆÀ¹ÀÁ½¸ö×Ö·û´®µÄÏàËÆÐÔ¡£
SELECT SOUNDEX ('lihan'), SOUNDEX ('lihon');
----- -----
L546  L542
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
=========================================================
7£ºchar
²ÎÊýΪ½éÓÚ 0 ºÍ 255 Ö®¼äµÄÕûÊý¡£Èç¹û¸ÃÕûÊý±í´ïʽ²»ÔÚ´Ë·¶Î§ÄÚ£¬½«·µ»Ø NULL Öµ¡£
SELECT char(125)
----
}
£¨ËùÓ°ÏìµÄÐÐÊýΪ 1 ÐУ©
==========================================


Ïà¹ØÎĵµ£º

sql陽曆轉陰曆

USE [rossic]
GO
/****** Object:  StoredProcedure [dbo].[fn_GetLunar]    Script Date: 02/23/2010 15:46:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
     
CREATE     proc   [dbo].[fn_GetLunar]   ......

SQLÖÐʹÓÃCONVERTת»»Ê±¼äÊä³ö¸ñʽ

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): 06.05.16
SELECT CONVERT(varchar(100), GETDATE(), 3): 16/05/06
SELECT CONVERT(varchar(100), GETDATE(), 4): 16.05.06
SELECT CONVERT(varch ......

SQL SERVER 2005 ¼ò½é


      SQL SERVER 2005 ¼ò½é
    Ò»Ö±ÒÔÀ´£¬T-SQL¶¼ÊÇÈÝÒ×ÉÏÊֵĽṹ»¯²éѯÓïÑÔ£¬Ëæ×ÅSQL ServerµÄ°æ±¾Ñݽø£¬³ýÁËÄÚ²¿¹¦ÄÜÔö¼Ó£¬
T-SQLÒ²´ó·ùÀ©ÔöÁËеIJéѯָÁî¡£ÀýÈ磺XQuery¡¢È¡µÃÅÅÃû˳ÐòµÄº¯Êý¡¢¼¯ºÏÔËËã´îÅäOVERÔËËã·û¡¢TOPÔËËã·û¿ÉÒÔ´îÅä±äÁ¿»ò×Ó²éѯ£¬ÒÔ¼°Í ......

SQLÈýÖÖ·ÖÒ³·½·¨

Ô­ÎĵØÖ·£ºhttp://topic.csdn.net/u/20100203/17
/8F916471-597D-481A-B170-83BCEFE3B199.html
============================ÎÒÊÇ·Ö¸î
·û================================
Ó¦Ò»¸öÅóÓѵÄÒªÇó£¬ÌùÉÏÊղصÄSQL³£Ó÷ÖÒ³µÄ°ì·¨¡«¡«
±íÖÐÖ÷¼ü±ØÐëΪ±êʶÁÐ
£¬[ID] int IDENTITY (1,1)
1.·ÖÒ³·½°¸Ò»£º(ÀûÓÃNot InºÍSELECT ......

SQL server 2005»ùÓÚÒÑ´æÔÚµÄ±í´´½¨·ÖÇø


< type="text/javascript">
< type="text/javascript">
Èç×ªÔØ£¬Çë×¢Ã÷³ö´¦£ºhttp://blog.csdn.net/robinson_0612/archive/2009/11/07/4783702.aspx

     
Ëæ×ŵ±½ñÊý¾Ý¿âµÄÈÝÁ¿Ô½À´Ô½¿ìµÄ³¯×ÅÔÚ´óÐÍÊý¾Ý¿â»ò³¬´óÐÍÊý¾Ý¿âµÄ·¢Õ¹£¬¶ÔÓÚÊý¾Ý¿âÖеĴóÐͱíÒÔ¼°¾ßÓи÷ÖÖ·ÃÎÊģʽµÄ±íµÄ¿ÉÉìËõÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ