Wednesday, November 22, 2017

SQL TRIM Function

In this lesson, we work with trim function.Trim function uses to remove the white space. Sometimes
data insert with some spaces. So in there fetching data sometimes not accurate. There needs SQL trim function.

SQL query:

 SELECT BillDate, Bill
 FROM patientbill WHERE 
 TRIM(UniqueId) = 123 ;

In this sql we see a function use beside UniqueId. If in this database uniqueId column data 123 has any space on it also comes.By using TRIM function we can do it.


No comments:

Post a Comment