Learn how to use the trim function for stripping repeating characters from the end of and/or the beginning of a string.
- [Instructor] Sometimes, especially…when you're dealing with input from users,…you'll need to remove spaces…or other characters from the beginning…and/or the end of a string.…This is what the TRIM function does.…So we're gonna use the memory database…for this example, and I've pasted some…select statements from the exercise file.…I'm just gonna press Go here.…These are examples using the TRIM function,…and you'll notice that here, in our HTML output,…it's impossible to see what this does.…The spaces can be significant in many contexts,…but they don't show up well in HTML,…so we need to use the View Source function…here in Google Chrome.…
I'm on a Mac and I'm pressing Alt + Cmd + U…to get View Source, Ctrl + U on a PC.…And this'll allow us to see the spaces,…because HTML, when it's rendered it doesn't…really allow us to see these spaces.…And so we come down here to our query results.…You notice we have SELECT string, just like that,…with the spaces on either side of the word string,…and you see in our results,…we have string with the spaces.…
- 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.