« MySQL/Opérateurs » : différence entre les versions

Contenu supprimé Contenu ajouté
Ligne 256 :
</source>
 
== TextOpérateurs operatorsde texte ==
Il n'y a pas d'opérateurs de concaténation en MySQL. Les opérateurs arithmétiques convertissent les valeurs en nombres et pour leurs opérations, donc la concaténation avec + est impossible.
There are no concatenation operators in MySQL.
 
La fonction <code>CONCAT()</code> pallie à cela.
Arithmetic operators convert the values into numbers and then perform arithmetic operations, so you can't use + to concatenate strings.
 
You can use the CONCAT() function instead.
 
=== LIKE ===
L'opérateur <code>LIKE</code> si la chaine recherchée est inclue dans une colonne :
The LIKE operator may be used to check if a string matches to a pattern. A simple example:
<source lang=sql>
SELECT * FROM articles WHERE titletitre LIKE 'hello world'
</source>
 
TheGénéralement patterncette matchingchaine isest usuallysensible caseà insensitive.la Therecasse, aremais twoil y a deux exceptions :
 
* when a LIKE comparison is performed against a column which has been declared with the BINARY flag (see CREATE TABLE);