Common Table Expressions (CTEs) are a handy way to break down a complex query into readable, reusable pieces. When you need several intermediate results – say, a filtered set, an aggregation, and a ranking – you can stack multiple CTE definitions together. PostgreSQL, SQL Server, MySQL 8+, and many other engines support this syntax.
Azure SQL Edge
Get the Number of Rows Affected by Previous SQL Statement
How to Insert Multiple Rows in SQL
When working with SQL, we can use the INSERT statement to insert a new row into a table. But what if we want to insert more than one row?
Fortunately, we can still use the INSERT statement. Below is a quick example that inserts multiple rows using SQL.
7 Ways to Insert Multiple Rows in SQL
We can use the SQL INSERT statement to insert a row into a table. We can also use it to insert more than one row.
Below are seven ways to insert multiple rows into a table in SQL. Most of these examples should work in the major RDBMSs, with the possible exception of Oracle. But no worries, I’ve included an example just for Oracle.
Fix: “BACKUP LOG cannot be performed because there is no current database backup.” in SQL Server/SQL Edge
If you’re trying to back up the transaction logs in a SQL Server or SQL Edge database, but you get an error that states BACKUP LOG cannot be performed because there is no current database backup, you’ll need to perform at least one full backup of the database before you attempt to back up the transaction logs.
How to Add Leading & Trailing Zeros in Azure SQL Edge
Azure SQL Edge uses a limited version of the SQL Server Database Engine. One of the limitations of Azure SQL Edge, is that it doesn’t currently support CLR-dependent T-SQL functions, such as the FORMAT() function.
This can be a problem when trying to format numbers.
However, there are often ways around such limitations. Here are examples of how we can pad numbers with leading and trailing zeros in SQL Edge.
How to Check the Recovery Model of a Database in Azure SQL Edge using T-SQL
In Azure SQL Edge, you can query the sys.databases catalog view to see the recovery model for each database.