Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Databases Programming Interviews:BtrieveClipperData ModelingData StructuresDatabase AdministrationDatabase Administrator (DBA)Database AnalystDatabase DeveloperDB DevelopmentEDI/Data Integration ExpertFirebirdHierarchicalIBM DB2InformixJava DatabaseMariaDBMicrosoft Access DeveloperMongoDBMS SQL ServerMySQL ProgrammingNetworkNoSQLObject RelationalPostgrePostgreSQLProgressRDBMSRelationalSQLSQL AdministratorSQL and PL/SQLSQL Notification ServicesSQL server 2008SSRSStored ProcedureSybaseTeradata
Copyright © 2018. All Rights Reserved
MySQL Programming Interview Question:
How To Use LIKE Conditions?
Submitted by: AdministratorA LIKE condition is also called pattern patch. There are 3 main rules on using LIKE condition:
* '_' is used in the pattern to match any one character.
* '%' is used in the pattern to match any zero or more characters.
* ESCAPE clause is used to provide the escape character in the pattern.
The following tutorial exercise provides you some good pattern matching examples:
SELECT 'GlobalGuideLine.com' LIKE '%center%' FROM DUAL;
1
SELECT 'GlobalGuideLine.com' LIKE '%CENTER%' FROM DUAL;
1
-- Case insensitive by default
SELECT 'GlobalGuideLine.com' LIKE '%CENTER_com' FROM DUAL;
1
Submitted by: Administrator
* '_' is used in the pattern to match any one character.
* '%' is used in the pattern to match any zero or more characters.
* ESCAPE clause is used to provide the escape character in the pattern.
The following tutorial exercise provides you some good pattern matching examples:
SELECT 'GlobalGuideLine.com' LIKE '%center%' FROM DUAL;
1
SELECT 'GlobalGuideLine.com' LIKE '%CENTER%' FROM DUAL;
1
-- Case insensitive by default
SELECT 'GlobalGuideLine.com' LIKE '%CENTER_com' FROM DUAL;
1
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.