Skip to content
Course Notes: Introduction to SQL Server
add text here
In the SQL cell below:
- Set the source to 'Course Databases' to query databases used in SQL courses.
- Set the source to 'DataFrames and CSVs' to query this course's CSV files (if any) with SQL
- Write SQL! Note that you cannot run queries that modify the database.
DataFrameas
df
variable
1. Strings
This lesson will be a gentle introduction working with text values, or strings, in SQL Server.
2. LEN
We can find the lengght of a text column (which menas the number of characters, including spaces)using the LEN function. In this example, we first select the descritpion column, and then the length of the description column, with a columnn alias/
It's useful to know the total length of a string as a starting point for use in other string calculations