Articles

External Article

The Basics of Inserting Data into a SQL Server Table

Before data can be read from of a SQL Server database table, the table needs to contain rows of data. One of the most typical ways to get data into a table is to use the INSERT statement. One row or multiple rows can be inserted with a single execution of an INSERT statement. You can even use the output of a stored procedure to insert rows. In this article, I will explore the basics of inserting data into a SQL Server table using the INSERT statement.

2022-10-19

SQLServerCentral Article

Manage Your Business Rules in T-SQL Query

Motivation At some point in the carrer, we have come across the problem of hard-coded values in SELECT or WHERE clauses.  And we all agree that these hardcoded values must be parametrised. This bad habit usually backfires when we need to troubleshoot a query. These hardcoded values are usually a business role baked in the […]

(1)

You rated this post out of 5. Change rating

2022-10-18 (first published: )

11,342 reads

Blogs

From Planning to Practice: Setting Up Your FinOps Framework

By

As someone who works in DevOps, I’m always focused on creating systems that are...

“We love to debate minutiae”

By

I am guilty as charged. The quote was in reference to how people argue...

Advice I Like: Knots

By

Learn how to tie a bowline knot. Practice in the dark. With one hand....

Read the latest Blogs

Forums

Restoring On Top II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Restoring On Top II

SQL Art 2: St Patrick’s Day in SSMS (Shamrock + Pint + Pixel Text)

By Terry Jago

Comments posted to this topic are about the item SQL Art 2: St Patrick’s...

Breaking Down Your Work

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Breaking Down Your Work

Visit the forum

Question of the Day

Restoring On Top II

I have a database, DNRTest, that has a number of tables and other objects in it. The other day, I was trying to mock up a test and ran this code on the same server:

-- run yesterday
CREATE DATABASE DNRTest2
GO
USE DNRTest2
GO
CREATE TABLE NewTable (id INT)
GO
Today, I realize that I need a copy of DNRTest for another mockup, and I run this:
-- run today
USE Master
BACKUP DATABASE DNRTest TO DISK = 'dnrtest.bak'
GO
RESTORE DATABASE DNRTest2 FROM DISK = 'dnrtest.bak' WITH REPLACE
What happens?

See possible answers