This week's book giveaway is in the Android forum.
We're giving away four copies of Android Programming: The Big Nerd Ranch Guide and have Bill Phillips & Chris Stewart on-line!
See this thread for details.
Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

SQL Trim Function  RSS feed

 
Abu Nene
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi it is a good practise to apply the SQL trim function on all the VARCHAR2 column used in the where clause? For eg.



Please advise, thanks.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on whether any whitespace might be significant for the application's purposes or not.
 
Jan Cumps
Bartender
Posts: 2630
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On several databases, this has a performance impact if the field is indexed. Yorur database might stop using the index if you wrap a function around your field.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!