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

ÈçºÎÔÚSQLÖÐÆôÓÃÈ«ÎļìË÷¹¦ÄÜ

ÈçºÎÔÚSQLÖÐÆôÓÃÈ«ÎļìË÷¹¦ÄÜ£¿
¡¡¡¡--------------------------------------------------------------------------------
¡¡¡¡È«ÎÄË÷ÒýµÄÒ»¸öÀý×Ó£¬ÔÚ²éѯ·ÖÎöÆ÷ÖÐʹÓãº
¡¡¡¡use pubs
¡¡¡¡go
¡¡¡¡--´ò¿ªÊý¾Ý¿âÈ«ÎÄË÷ÒýµÄÖ§³Ö
¡¡¡¡execute sp_fulltext_database 'enable'
¡¡¡¡go
¡¡¡¡--½¨Á¢È«ÎÄĿ¼ft_titles
¡¡¡¡execute sp_fulltext_catalog 'ft_titles', 'create'
¡¡¡¡go
¡¡¡¡--Ϊtitles±í½¨Á¢È«ÎÄË÷ÒýÊý¾ÝÔª£¬UPKCL_titleidindÊÇÖ÷¼üËù½¨Á¢µÄΨһË÷Òý£¬¿ÉÓÉsp_help titlesµÃÖª
¡¡¡¡execute sp_fulltext_table 'titles','create', 'ft_titles', 'UPKCL_titleidind'
¡¡¡¡go
¡¡¡¡--ÉèÖÃÈ«ÎÄË÷ÒýÁÐÃû
¡¡¡¡exec sp_fulltext_column 'titles', 'title', 'add'
¡¡¡¡go
¡¡¡¡exec sp_fulltext_column 'titles', 'notes', 'add'
¡¡¡¡go
¡¡¡¡--½¨Á¢È«ÎÄË÷Òý
¡¡¡¡exec sp_fulltext_table 'titles', 'activate'
¡¡¡¡go
¡¡¡¡--Ìî³äÈ«ÎÄË÷ÒýĿ¼
¡¡¡¡exec sp_fulltext_catalog 'ft_titles', 'start_full'
¡¡¡¡go
¡¡¡¡--ʹÓÃcontainsºÍfreetext
¡¡¡¡select title, notes from titles
¡¡¡¡where contains(title, '"computer Cooking"')
¡¡¡¡go
¡¡¡¡select title, notes from titles
¡¡¡¡where freetext(title, 'computer Cooking')
¡¡¡¡go
¡¡¡¡select title, notes from titles
¡¡¡¡where freetext(title, '"computer Cooking"')
¡¡¡¡go
¡¡¡¡select title, notes from titles
¡¡¡¡where contains(title, 'computer')
¡¡¡¡go
¡¡¡¡select title, notes from titles
¡¡¡¡where freetext (*, 'computer')
¡¡¡¡go
------------------------------------------------------------------------------------------------------
ʾÀý
SQL SERVERÊý¾Ý¿âÈ«ÎÄË÷ÒýµÄʾÀý£¬ÒÔpubsÊý¾Ý¿âΪÀý¡£
Ê×ÏÈ£¬½éÉÜÀûÓÃϵͳ´æ´¢¹ý³Ì´´½¨È«ÎÄË÷ÒýµÄ¾ßÌå²½Ö裺
1) Æô¶¯Êý¾Ý¿âµÄÈ«ÎÄ´¦Àí¹¦ÄÜ (sp_fulltext_database)
2) ½¨Á¢È«ÎÄĿ¼ (sp_fulltext_catalog)
3) ÔÚÈ«ÎÄĿ¼ÖÐ×¢²áÐèҪȫÎÄË÷ÒýµÄ±í (sp_fulltext_table)
4) Ö¸³ö±íÖÐÐèҪȫÎÄË÷ÒýµÄÁÐÃû (sp_fulltext_column)
5) Ϊ±í´´½¨È«ÎÄË÷Òý (sp_fulltext_table)
6) Ìî³äÈ«ÎÄĿ¼ (sp_fulltext_catalog)
---------********ʾÀý********-------------
ÒÔ¶ÔpubsÊý¾Ý¿âµÄtitleºÍnotesÁн¨Á¢È«ÎÄË÷Òý£¬Ö®ºóʹÓÃË÷Òý²éѯtitleÁлònotesÁÐÖаüº¬ÓÐdatebase »òcomputer×Ö·û´®µÄͼÊéÃ


Ïà¹ØÎĵµ£º

¾­µäÓÐÓõÄSQLÓï¾äÊÕ¼¯

1.˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb)
SQL: select * into b from a where 11
2.˵Ã÷£º¿½±´±í(¿½±´Êý¾Ý,Ô´±íÃû£ºa Ä¿±ê±íÃû£ºb)
SQL: insert into b(a, b, c) select d,e,f from a;
3.˵Ã÷£ºÏÔʾÎÄÕ¡¢Ìá½»È˺Í×îºó»Ø¸´Ê±¼ä
SQL: select a.title,a.username,b.adddate from table a,(select max(adddat ......

sql Óï¾ä

select * from pet;
insert into pet values('Liujingwei','Liuchao','cat','f','1984-04-18',null);
UPDATE pet set birth='1989-08-31' WHERE name='Slim';
select * from pet WHERE birth>'1998-1-1';
SELECT * from pet WHEREselect * from pet;
insert into pet values('Liujingwei','Liuchao','cat','f','198 ......

linq to sql ·ÖÒ³ µÄ¼¸ÖÖ·½·¨

1.Êý¾ÝµÄ·Ö²¼Skip()ºÍtake()
Skip(100)´ú±íÌø¹ý100Ðкó.´ÓµÚ101ÐпªÊ¼·ÖÒ³;
take(10)±íʾ¶àÉÙÐзÖÒ³;
Àý:
var result=from pdt in db.Product
                 select pdt;
this.dataview.DataSource=result.Skip(10).take(10);
......

SQLÓï¾ä´´½¨£¨Êý¾Ý¿â|Êý¾Ý±í|Ë÷Òý£©

CREATE Table <±íÃû>
   £¨[<ÁÐÃû1>] ÀàÐÍ (³¤¶È) [ȱʡֵ][Áм¶Ô¼Êø]
     [£¬<ÁÐÃû2> Êý¾ÝÀàÐÍ[ȱʡֵ][Áм¶Ô¼Êø]]….
     [£¬UNIQUE£¨ÁÐÃû[£¬ÁÐÃû]….£©]
     [£¬PRIMARY KEY£¨ÁÐÃû[£¬ÁÐÃû]…£©]
&n ......

С²¼×÷Æ·£ºOracle 11g SQL»ù´¡ÈëÃÅϵÁÐÅàѵ(È«30½²)

==============================================
 
µÚ01½²: Chapter 00--Oracle 11g SQL Fundamentals Training Introduction
ÔÚÏß¹Û¿´£º http://www.boobooke.com/v/bbk2003
ÊÓÆµÏÂÔØ£º http://www.boobooke.com/v/bbk2003.zip
 
µÚ02½²: Chapter 00--Oracle 11g SQL Fundamentals Training Introduction ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ