ECE356 Lecture Notes - Lecture 5: Unique Key, Mysql, Relational Algebra
Document Summary
String operations are complicated in any language and sql is no exception. We have used some string matching already so we have a pretty good idea how it works: by default a string is enclosed in single-quote characters such as "aaaa 111". Double quotes can also be used, especially if you need to enclose a single-quote literal in your string such as: "burk"s falls". The sql standard says that string comparison with = is case sensitive, but mysql (and some others) do not respect this and perform case-insensitive comparison [sks11]. Mysql has gotten better and made this a con gurable parameter, but it"s still something to be wary of. Some functions familiar from c-like languages exist: upper(), lower(), trim(), et cetera. Pattern matching can be done using like which takes two special characters as wildcards: % (match any substring) and _ (match any single character) [sks11].