John

John Morehouse is currently a Consultant with Denny Cherry & Associates living in Louisville, Kentucky. With over 2 decades of technical experience in various industries, John now focuses on the Microsoft Data platform and specializes in Microsoft SQL Server. He is honored to be a Microsoft Data Platform MVP, 2016 Idera Ace, Friend of Red Gate since 2015, Sentry One PAC member & Community Ambassador. John has passion around speaking, teaching technical topics and giving back to the technical community. He is a user group leader, SQL Saturday organizer, and former PASS regional mentor. He is also a blogger, avid tweeter, and a frequent speaker at SQL Saturday's as well as other conferences. If you want to find John, you can find him on Twitter (@sqlrus) or on his blog, http://sqlrus.com.

Blog Post

Merry Christmas

Christmas is this week so not a technical post for this week.  Just a simple post wishing you and your family as many blessing as possible (especially in the...

2020-12-25

2 reads

Blog Post

Merry Christmas

Christmas is this week so not a technical post for this week.  Just a simple post wishing you and your family as many blessing as possible (especially in the...

2020-12-25

4 reads

Blog Post

Merry Christmas

Christmas is this week so not a technical post for this week.  Just a simple post wishing you and your family as many blessing as possible (especially in the...

2020-12-25

2 reads

Blog Post

Merry Christmas

Christmas is this week so not a technical post for this week.  Just a simple post wishing you and your family as many blessing as possible (especially in the...

2020-12-25

3 reads

Blog Post

Merry Christmas

Christmas is this week so not a technical post for this week.  Just a simple post wishing you and your family as many blessing as possible (especially in the...

2020-12-25

2 reads

Blogs

Securing Kubernetes With External Secrets Operator on AWS

By

Here’s a way to centralize management, rotate secrets conveniently without downtime, automate synchronization and...

Save Azure PostgreSQL Backup to Storage

By

This may or may not be helpful in the long term, but since I’m...

The Book of Redgate: What’s Great about Redgate?

By

“I’m sick of hearing about Red Gate.” The first article in the book has...

Read the latest Blogs

Forums

Dynamic T-SQL Script Parameterization Using Python

By omu

Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...

Widespread New Technology Adoption

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Widespread New Technology Adoption

Multiple Sequences

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Multiple Sequences

Visit the forum

Question of the Day

Multiple Sequences

In SQL Server 2022, I run this code:

CREATE SEQUENCE myseqtest START WITH 1 INCREMENT BY 1;
GO
CREATE TABLE NewMonthSales
  (SaleID    INT
  , SecondID int
 , saleyear  INT
 , salemonth TINYINT
 , currSales NUMERIC(10, 2));
GO
INSERT dbo.NewMonthSales
  (SaleID, SecondID, saleyear, salemonth, currSales)
SELECT
  NEXT VALUE FOR myseqtest
, NEXT VALUE FOR myseqtest
, ms.saleyear
, ms.salemonth
, ms.currMonthSales
FROM dbo.MonthSales AS ms;
GO
SELECT * FROM dbo.NewMonthSales AS nms

Assume the dbo.MonthSales table exists. If I run this, what happens?

See possible answers