In SQL Server, you can use the ROWCOUNT_BIG() system function to return the number of rows affected by the last T-SQL statement.
It works exactly the same as @@ROWCOUNT, except that ROWCOUNT_BIG() returns its result as a bigint.
Database Management Systems
In SQL Server, you can use the ROWCOUNT_BIG() system function to return the number of rows affected by the last T-SQL statement.
It works exactly the same as @@ROWCOUNT, except that ROWCOUNT_BIG() returns its result as a bigint.
In SQL Server, you can use the SET SHOWPLAN_ALL statement to return the query plan for a given T-SQL statement. The query plan displays detailed information about how the statement is executed, as well as estimates of the resource requirements for the statements.
In SQL Server, you can use the SET SHOWPLAN_TEXT statement to return the query plan for a T-SQL statement. This contains detailed information about how the statement is executed.
I’ve written quite a number of tutorials for using Database Mail, and I’ve created this article to list them all in one place.
I first included these links at the bottom of How to Send Emails from SQL Server (T-SQL), but I thought it might be helpful to move them to their own article as a quick-reference.
I get it. You’re trying to learn SQL, but they won’t even tell you the most fundamental part – what you need to run SQL!
You’ve got the SQL code… but where do you actually run it? What software program do you need before you can run your SQL query against a database?
If that’s you, all is about to be revealed!
In SQL Server, the T-SQL CASE expression is a scalar expression that returns a value based on conditional logic. It evaluates a list of conditions and returns a value, based on the outcome of those conditions..
In some ways, the SQL Server CASE expression is similar to IF...ELSE. However, CASE allows you to check for multiple conditions, whereas IF...ELSE doesn’t.
If you’re using OPENJSON(), but you’re trying to remember how to select an inner fragment from the JSON document, read on.
Did you know that PostgreSQL is available in all Ubuntu versions by default?
Yes, that means that your Ubuntu 20.04 installation probably already has a PostgreSQL package sitting there waiting for you to install it.
And you can install it with one command, which I’ll show you below.
But what if you prefer to run the latest version of Postgres instead? Well, I’ll also show you how to install that. Installing the latest version is almost as easy as installing your local package.
The following steps demonstrate how to install PostgresSQL on Ubuntu 18.04.
There are a couple of ways to go about installing Postgres on Ubuntu.
But before we start jumping in and installing it, did you know that by default, PostgreSQL is already available in Ubuntu 18.04?
So one option is to go right ahead and use the version that’s already included with Ubuntu.
But unless you have reason not to, you will probably want to run the latest version of PostgreSQL, in which case you’ll want to download and install the latest version.
This tutorial covers both options.
Here’s a quick tutorial that demonstrates how to check or change the compatibility level of a database using the SQL Server Management Studio (SSMS) graphical user interface (GUI).
If you want to see how to do it in T-SQL, see How to Change the Compatibility Level of a Database using T-SQL.