setting full text search using script

,

select *
from dbo.Employees
where freetext(*, 'jonh')

select Emp.*
from dbo.Employees Emp
INNER JOIN
FREETEXTTABLE ( dbo.Employees, *, 'jony desuza') AS Keytbl
ON Emp.EmpID = Keytbl.

select *
from dbo.Employees
where contains(*, 'jony desuza')

select Emp.*
from dbo.Employees Emp
INNER JOIN
CONTAINSTABLE ( dbo.Employees, *, 'jony desuza') AS Keytbl
ON Emp.EmpID = Keytbl.

exec sp_fulltext_catalog 'ftcEmployees', 'create', 'D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData'
go

exec sp_fulltext_table 'dbo.Employees', 'create', 'ftcEmployees', 'PK_tbl_fulltextExample_ID'
go

exec sp_fulltext_column 'dbo.Employees', 'FirstName', 'add'
go

exec sp_fulltext_column 'dbo.Employees', 'LastName', 'add'
go

exec sp_fulltext_column 'dbo.Employees', 'Adderss', 'add'
go

exec sp_fulltext_column 'dbo.Employees', 'ContactNo', 'add'
go

exec sp_fulltext_table 'dbo.Employees','activate';
go

exec sp_fulltext_catalog 'ftcEmployees', 'start_full';
go

exec sp_fulltext_table 'dbo.Employees', 'start_full';
go

Rate

5 (1)

Share

Share

Rate

5 (1)