Learn how to return fixed length strings from the database, padding empty spaces with user-specified characters using the RPAD and LPAD functions.
- Using the LPAD and RPAD functions,…which are short for left pad and right pad,…allows us to buffer strings that will…return from the database so that they fill…as specified, predetermined lengths.…The characters, which fill these strings…up to the predetermined required length,…can be added to the left part of the string…or to the right part of the string.…Sounds confusing?…Well, it's easier than you think.…Let's see it in action.…Let's start by selecting the first name column…from our employees table.…
And let's start with an example of the…LPAD, or left pad, function.…So, we'll specify LPAD, and inside brackets,…specify the first underscore name column,…followed by the padding length,…so 10 characters comma, and, inside quotation marks,…the character we want to use for the padding,…such as the star character.…So running the query as is will return the…value for the first name column,…but we'll pad it with the star character…until the length of the returned valued…reaches the number which we have provided…as an argument for the LPAD function.…
Note: This training course is appropriate for beginning database developers with no prior experience with SQL or Oracle.
- Using Oracle SQL*Developer, the free development environment
- Selecting data from tables
- Filtering data
- Using functions to manipulate data
- Joining data from tables
- Creating tables
- Updating values
- Truncating data
- Grouping and ordering result sets
- Working with primary keys
- Checking constraints
Skill Level Beginner
Oracle 12c Database: Administrationwith David Yahalom3h 58m Beginner
Database Foundations: Core Conceptswith Adam Wilbert2h 14m Beginner
Database Foundations: Administrationwith Adam Wilbert1h 14m Beginner
1. Introduction to SQL
2. Preparing the Course Environment
Downloading the course VM2m 16s
3. Using Oracle SQL Developer
4. Basic SELECT Queries
5. String, Number, and Date Functions
6. Joining Table Data
7. Manipulating Data
8. Grouping Data
9. Advanced Topics
Next steps1m 33s
- 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.