Entering Character Strings in MySQL

Q

How To Include Character Strings in SQL statements in MySQL?

✍: FYIcenter.com

A

If you want to include character strings in your SQL statements, you need to quote them in one of the following formats:

  • Using single quotes. For example 'FYIcenter.com'.
  • Using double quotes. For example "FYI Center".
  • Using single quotes prefixed with N for NATIONAL characters (same as UTF8 characters). For example N'Allo, Francois.'.
  • Using single quotes prefixed with _utf8 for UTF8 characters. For example _utf8'Allo, Francois.'.

 

Escape Special Characters in MySQL

Including Comments in SQL Statements in MySQL

Introduction to SQL Basics in MySQL

⇑⇑ MySQL Database Tutorials

2018-04-12, 1522🔥, 0💬