Skip to content
all things sql website logo

All Things SQL

All Things Related To SQL, Databases & Cloud Based Solutions

  • Home
  • What is SQL?
  • Contact
  • About
  • Privacy Policy / Disclaimer

SQL Functions

SQL Functions 

SQL Replace Function – Swapping Words & Characters

how to replace strings in sql, replace function in sql, replacing strings in sql, sql replace function, sql replace strings, sql replacing strings

Using the replace function in SQL can be useful to swap out words or characters with others. As an example,

Read more
SQL Functions 

SQL Substring – Selecting Specific Field Data

sql query substring, sql substring, sql substring function, substring function in sql, substring sql, substring sql query

We can write a SQL query using the substring function to select the exact pieces of information needed in a

Read more
SQL Functions 

SQL – Converting Strings to Upper & Lower-Case

lower upper sql, sql lower upper, sql upper lower, upper lower sql

In order to convert character or string columns in SQL to UPPER or LOWER case we need to know the

Read more
SQL Functions 

SQL String Length – Finding Column Width

length of a string in sql, sql string function, sql string length, sql string width, string function sql, string length sql, string width sql

To find the string length (or width) in a field we can use the sql length function. The specific syntax

Read more
SQL Functions 

SQL TRIM Functions – Remove Blanks & Whitespace

remove blanks in sql, removing blanks in sql, removing whitespace in sql, sql remove blanks, sql remove whitespace, sql removing blanks, sql removing whitespace, sql trim all spaces, sql trim function, sql trim whitespace, trim function sql, trim spaces in sql

Often times, data is not cleansed appropriately when pulling data from files or other database tables. As a result, this

Read more
SQL Functions 

SQL CAST & CONVERT Function – Modifying Data Types

cast function sql, cast int to varchar sql, cast varchar to int sql, convert vs cast sql, sql cast function, sql cast int to varchar, sql cast varchar to int, sql cast vs convert

There are a few ways (depending on the database) where we can convert a column data type. The main two

Read more
SQL Functions 

SQL LEAD() Function – Getting Next Value

sql function lead, sql function next value, sql lead example, sql lead function example, sql next value, sql server lead function, sql window lead

Very similar to the Lag() function that provides a previous record value is the Lead() function which provides the opposite

Read more
SQL Functions 

SQL LAG() Function – Getting Previous Value

sql function lag, sql function previous value, sql lag example, sql lag function example, sql previous value, sql server lag function, sql window lag

There are several functions in SQL that are very useful such as the Lag() and Lead() functions. The lag function

Read more

Start Learning SQL

  • SELECT – Start Here
  • DISTINCT and COUNT – The Basics
  • WHERE – Using Filters
  • AND Versus OR Operators
  • Parentheses – Order of Operations
  • JOIN – Inner Join and Aliases
  • WHERE – Joining Tables
  • JOIN – Left, Right, and Full Outer
  • GROUP BY – Count, Sum, and More
  • HAVING – Filtering Aggregates
  • ORDER BY – Sorting Results
  • UNION ALL – Combining Datasets
  • MINUS – Subtracting Datasets

Advanced SQL

  • CAST & CONVERT – Modifying Data Types
  • CONCAT – Combining Multiple Columns
  • INSERT – Using SELECT Statement
  • CASE Statement – Replacing If-Else
  • LEAD() Function – Getting Next Values
  • LAG() Function – Getting Previous Values

DML & DDL Examples

  • DDL vs DML – A Comparison
  • CREATE TABLE – Examples
  • ALTER TABLE – Add, Drop, & Modify Columns
  • TRUNCATE vs DELETE – Erasing Tables
  • DROP – Tables, Views, Etc. – Deleting Objects

Common SQL Problems

  • Finding Duplicates
  • Getting Today’s Date

Data Warehousing

  • Fact Tables vs Dimension Tables
  • Slowly Changing Dimensions
  • OLAP vs OLTP Databases
Copyright © 2023 All Things SQL. All rights reserved.
Theme: ColorMag by ThemeGrill. Powered by WordPress.