MySQL strcmp() Function String Value Example

MySQL strcmp() Function String Value Example

Open your MySQL Query Editor then copy & paste the below code to get the value of strcmp() MySQL Function String Value Example:

   -- mysql strcmp() function compares exactly two values, String Value Example

   select strcmp('test', 'testtt'), strcmp('test', 'test'), strcmp('test', NULL), strcmp(NULL, 'test');

   -- The mysql strcmp() function returns 0 if  equals 
   -- mysql strcmp() function returns -1 if  is smaller than 
   -- The mysql strcmp() function returns 1 if  larger than 
   -- OR if the comparison returns a NULL
   -- mysql strcmp() function returns NULL if  or  is NULL

-- is comment in MySQL -- in fact it is comment in MSSQL and Oracle as well

MySQL strcmp() Function String Value Example - Result in MySQL Query Editor

 

Related Tutorial Examples

  1. MySQL isnull() Function Example
  2. MySQL strcmp() Function NULL Value Example
  3. MySQL interval() Function Example
  4. MySQL coalesce() Function Example
  5. MySQL IF() Function Boolean Value Example
  6. MySQL Stored Procedure: Variable Example
  7. Creating Database(s) using SQL Command MySQL Example
  8. PHP HTML Form select box Example
  9. 20 steps to make CakePHP Blog Project
  10. PERL Example: Hellow world! program in PERL

No comments:

Post a Comment

leave your comments here..