VARCHAR(1000) better than TEXT for searching??? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

VARCHAR(1000) better than TEXT for searching???

I have a column just for search terms. People can enter their search terms and submit them. My sql then does a: itemSearchTerms LIKE ‘%’ + @searchTerms + ‘%’
The column should never really have over 1000 characters in it. Would it be better to use VARCHAR(1000) or TEXT for this scenario? Thanks
use VARCHAR(1000) Madhivanan Failing to plan is Planning to fail
Use Varchar(1000) as Madhi suggested because if you use TEXT column you may end up with some limitation…
If your column is big in some cases then you can use TEXT with TEXT IN A ROW option…
MohammedU.
Microsoft SQL Server MVP
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

]]>