Events

External Article

Database source control workshop, Cambridge UK

  • Article

Redgate is hosting a 1 day public workshop on April 22, 2015. This workshop will teach you how to put a database in source control, deploy a database from source control, and monitor database changes across development, testing, and production environments.

2015-03-24

7,650 reads

Technical Article

SQL Saturday #364 - Boston, MA

  • Article

SQL Saturday is coming to Boston on April 18th 2015. Join us for a free day of SQL Server training and networking, and listen to great speakers like Grant Fritchey, Brent Ozar, and Andy Leonard. Register while space is available.

2015-03-19

7,512 reads

Technical Article

SQL Saturday #387 - Madison, WI

  • Article

SQL Saturday is coming to Madison, Wisconsin on April 11th 2015. Join us for a free day of SQL Server training and networking and hear expert speakers like David Klee, Wendy Pastrick, and Jes Borland. Register while space is available.

2015-03-16

5,830 reads

Technical Article

SQL Saturday #381 - Richmond, VA

  • Article

SQL Saturday is coming to Richmond on March 21, 2015. Join us for a free day of SQL Server training and networking. There are also paid-for pre-con sessions available from Tim Mitchell and Kevin Kline. Register while space is available.

2015-02-27

7,175 reads

Technical Article

SQL Saturday #374 - Austria

  • Article

SQL Saturday is holding its first event in Vienna on February 28, 2014. With over 20 sessions on SQL Server, the event is aimed at all those interested in SQL Server - from pros to beginners. Register while space is available.

2015-02-03

6,169 reads

Technical Article

SQL Saturday #363 - Nashville, TN

  • Article

SQL Saturday is coming to Nashville on January 17 for a free day of SQL Server training and networking. There will also be paid-for pre-cons to this event on Thursday and Friday, so register while space is available.

2014-12-29

6,434 reads

Blogs

SQL Server Performance – What IT Leaders Need to Know

By

IT leaders have a lot on their plates! Budgets, staffing, security, uptime, and keeping...

FREE Window Functions Course (This Month Only!)

By

Want to really level up your SQL game? I mean, go from good to great? This March...

Tally Table Alternatives: #SQLNewBlogger

By

We published an article recently at SQL Server Central on Tally Tables in Fabric...

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...

Multiple Sequences

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Multiple Sequences

Using SQL Server Stored Procedures with the Django ORM

By omu

Comments posted to this topic are about the item Using SQL Server Stored Procedures...

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