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

sql server 2008È«ÎÄË÷Òý¸ÉÈÅ´ÊʾÀý

´¦ÀíÍøÕ¾²éѯ°üº¬”Ö®”×Ö³öÏ֔ȫÎÄËÑË÷Ìõ¼þÖаüº¬¸ÉÈÅ´Ê”ÏÖÏóµÄ×ܽ᣺
author:perfectaction
Sql server 2008È«ÎÄË÷ÒýµÄ¸ÉÈŴʱíĬÈÏÔÚResource¿âϵͳ±íÄÚ£¬ÎÞ·¨¸ü¸Ä£¬µ«sql2008ÌṩÁË×Ô¶¨Òå¸ÉÈŴʱíµÄ¹¦ÄÜ£¬¿É°ó¶¨µ½Ä³¸öÈ«ÎÄË÷ÒýÉÏ¡£
Ïà¹Ø²Ù×÷ÈçÏ£º
--sql server 2008 È«ÎÄË÷Òý½¨Á¢¼°´´½¨È«ÎÄ·ÇË÷Òý×Ö±í(¸ÉÈŴʱí)
--ÒÔdbtestµÄuser_info±íΪÀý
--Ñ¡ÔñÊý¾Ý¿â
USE dbtest
GO
--´´½¨È«ÎÄĿ¼£¬Õâ¸öÊÇÂß¼­Ãû
CREATE FULLTEXT CATALOG user_info AS DEFAULT;
GO
--´´½¨È«ÎÄ·ÇË÷Òý×Ö±í(¸ÉÈŴʱí)
CREATE FULLTEXT STOPLIST T_FULLTEXT_STOPLIST_user_info --È«ÎÄ·ÇË÷Òý×Ö±í±íÃû
from SYSTEM STOPLIST; --´ÓϵͳȫÎÄ·ÇË÷Òý×Ö±íµ¼Èë
--ɾ³ýÎÒÃDz»ÐèÒªµÄ¸ÉÈÅ´Ê£¬Èç"Ö®"×Ö
ALTER FULLTEXT STOPLIST [T_FULLTEXT_STOPLIST_user_info]
DROP 'Ö®' LANGUAGE 'Simplified Chinese';
--Ôö¼ÓÎÒÃÇÐèÒªµÄ¸ÉÈÅ´Ê£¬Èç"Ö®"×Ö
ALTER FULLTEXT STOPLIST [T_FULLTEXT_STOPLIST_user_info]
ADD 'Ö®' LANGUAGE 'Simplified Chinese';
--´´½¨±íuser_infoµÄÈ«ÎÄË÷Òý
CREATE FULLTEXT INDEX ON [dbo].[user_info] --±íÃû
([mem_name] --ÁÐÃû
LANGUAGE [Simplified Chinese])
KEY INDEX [PK_user_info] --¾Û¼¯Ë÷ÒýÃû
ON (FILEGROUP [ftfg_FT_user_info]) --Ö¸¶¨Îļþ×éÃû£¬Èç²»Ö¸¶¨£¬Ôò´æÔÚµ±Ç°±íËùÔÚÎļþ×é
WITH (CHANGE_TRACKING = AUTO,
STOPLIST =T_FULLTEXT_STOPLIST_user_info --Ö¸¶¨Ê¹ÓõÄÈ«ÎÄ·ÇË÷Òý×Ö±í
)
--ÆäËü£º
--¶ÔÒÑ´æÔÚÈ«ÎÄË÷ÒýÖ¸¶¨È«ÎÄ·ÇË÷Òý×Ö±í£¬ÃüÁîÖ´Ðкó£¬
--Èç¹ûCHANGE_TRACKING = AUTO£¬Ôò»á×Ô¶¯ÐÞ¸ÄÒÑÌî³äË÷Òý£¬µ«²»»áÈ«²¿ÖØÌî
ALTER FULLTEXT INDEX on user_info --±íÃû
SET STOPLIST =SYSTEM  --Ö¸¶¨Ê¹ÓõÄÈ«ÎÄ·ÇË÷Òý×Ö±íΪϵͳ×Ô´ø
ALTER FULLTEXT INDEX on user_info --±íÃû
SET STOPLIST=T_FULLTEXT_STOPLIST_user_info  ;--Ö¸¶¨Ê¹ÓõÄÈ«ÎÄ·ÇË÷Òý×Ö±íΪÓû§×Ô¶¨Òå
--Æô¶¯Ìî³ä£¬Èç¹ûCHANGE_TRACKING != AUTO£¬ÔòÐèÒªÆô¶¯Ò»´ÎÌî³ä²ÅʹÐÂÉ趨µÄÈ«ÎÄ·ÇË÷Òý×Ö±íÉúЧ;
ALTER FULLTEXT INDEX on user_info --±íÃû
START FULL POPULATION


Ïà¹ØÎĵµ£º

ת SQL server ÓëOracle¿ª·¢±È½Ï

Ô­ÎĵØÖ·£ºhttp://www.cnblogs.com/wangxiaohuo/archive/2008/04/20/1162631.html
 
±¾ÎĵµÖ÷Òª´ÓoracleÓësql serverÓï·¨ÉϽøÐвîÒìÐԱȽϣ¬ÖîÈçÁ½ÕßÔÚ¹ÜÀí£¬ÐÔÄÜ£¬ÓÅ»¯µÈ·½ÃæµÄ²îÒì²»×÷±È½Ï¡£
¡ñ¸ÅÄîÉÏÇø±ð
   1.Oracle ÊÇÒ»ÖÖ¶ÔÏó¹ØϵÊý¾Ý¿â¹ÜÀíϵͳ£¨ORDBMS),¶øSql server Ö»ÊǹØϵÐÍÊý¾Ý¿â¹Ü
&nbs ......

SQL SERVER ÈÕÆÚ¸ñʽ

³£Ó㺠Select CONVERT(varchar(100), GETDATE(), 8): 10:57:46
Select CONVERT(varchar(100), GETDATE(), 24): 10:57:47
Select CONVERT(varchar(100), GETDATE(), 108): 10:57:49
Select CONVERT(varchar(100), GETDATE(), 12): 060516 Select CONVERT(varchar(100), GETDATE(), 23): 2006-05-16 ......

sqlÓïÑÔ£ºÈçºÎÅжÏ×Ö¶ÎÊÇ·ñ´æÔÚ£¬ÈçºÎɾ³ý¼°´´½¨×Ö¶Î

ÈçºÎÅжÏ×Ö¶ÎÊÇ·ñ´æÔÚ
 if col_length('±íÃû','×Ö¶Î1') is null  ALTER TABLE ±íÃû ADD ×Ö¶Î1 Nvarchar(50)  if col_length('±íÃû','×Ö¶Î2') is null  ALTER TABLE ±íÃû ADD ×Ö¶Î2 Nvarchar(50) ");
ɾ³ý×Ö¶Î
if col_length('±íÃû','×Ö¶Î1,') is not null  ALTER TABLE ±íÃû drop  c ......

SQL ΪÖ÷±íµÄıһÌõ¼Ç¼£¬ÔÚÖмä±íÖÐͬʱ²åÈë¶àÌõÊý¾Ý

ÓÐʱÎÒÃÇ»áÏñÏÂÃæµÄÇé¿öÒ»Ñù£¬ÎªÖ÷±íµÄıһÌõ¼Ç¼£¬ÔÚÖмä±í(T_Stud_Course ±í)ÖÐͬʱ²åÈë¶àÌõÊý¾Ý
T_Student ±í
Stud_ID
Name
1
Tom
2
Jack
T_Course ±í
Course_ID
Course
1
Chinese
2
English
T_Stud_Course ±í
ID
Stud_ID
Course_ID
1
1
1
2
1
2
3
2
2
 
ÏÖÔÚÎÒÃÇ¿ÉÒÔÏÂÃæµÄ´æ´¢¹ý³ÌÀ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ