Learn how to use literal strings in SQL and concatenate strings. Explore some common string functions.
- [Instructor] SQL has a number of operators and functions for dealing with strings. In standard SQL a literal string is represented by a series of characters enclosed in single quote marks. Keep in mind there are some database systems notably older versions of MySQL where double quotes may be used instead. This is not standard. But, it's very common so it's worth knowing about. If you need to use a single quote in your string you use two single quotes to represent the one.
Notice the two single quotes in the word here's in the example. String handling tends to be platform specific in SQL. A simple thing like concatenating two strings together can be very different on different platforms. Standard SQL provides a concatenation operator. SQLite, Postgres and many other systems support this standard. MySQL uses a function. Microsoft SQL uses a non-standard operator.
String functions also vary from system to system. There are really just a few string functions that are considered standard. And even these are not supported or are different on different systems. SQLite supports these functions as close to the standard as possible. In the rest of this chapter I'll cover some of the more common standard and non-standard string functions as implemented by SQLite. You'll need to consult your documentation for your system to find out how these and other string functions are implemented on your system.
- Understanding SQL terminology and syntax
- Creating new tables
- Inserting and updating data
- Writing basic SQL queries
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Defining functions in PHP
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times1m 52s
11. Views and Subselects
12. Defined Functions
13. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.