Volltextsuche
Beispiele für Volltextsuche basieren auf der MS- Adventure Works Datenbank 2016. Kann hier heruntergeladen werden.
- Einführung
- hier
- Abfragen über Volltextindizes
- hier
- CONTAINS- Prädikat
- hier
select * from Production.ProductDescription where CONTAINS(Description, '(light NEAR aluminum) OR (lightweight NEAR aluminum)' ); select * from CONTAINSTABLE (Production.ProductDescription, Description, '(light NEAR aluminum) OR (lightweight NEAR aluminum)' ) order by RANK desc; SELECT FT_TBL.ProductDescriptionID, FT_TBL.Description, KEY_TBL.RANK FROM Production.ProductDescription AS FT_TBL INNER JOIN CONTAINSTABLE (Production.ProductDescription, Description, '(light NEAR aluminum) OR (lightweight NEAR aluminum)' ) AS KEY_TBL ON FT_TBL.ProductDescriptionID = KEY_TBL.[KEY] WHERE KEY_TBL.RANK > 2 ORDER BY KEY_TBL.RANK DESC; go