SQLStudies

Blog Post

fn_OBJECT_TYPE

I recently started using OBJECT_NAME, OBJECT_SCHEMA_NAME and OBJECT_ID functions; unfortunately I really could have used OBJECT_TYPE but it doesn’t exist...

2012-10-19

1,234 reads

Blog Post

Multiple CTEs

Multiple CTEs
It’s somewhat obscure in BOL and I wasn’t able to find any examples but it turns out you can...

2012-10-11 (first published: )

4,561 reads

Blog Post

sp_helptext

My manager has been quietly laughing under his breath at me for years. Usually because I much prefer queries and...

2012-09-02

4,111 reads

Blogs

A New Word: Lackout

By

lackout – n. the sudden awareness that you’re finally over someone, noticing that the...

Delta Lake over Spark Connect

By

All Spark Connect Posts I have just finished an update for the spark connect dotnet...

Introducing FabricTools (PowerShell module)

By

🔍 The Challenge: DevOps for Microsoft Fabric In the world of Microsoft Fabric, DevOps...

Read the latest Blogs

Forums

Merge techniques

By purushotham.k9

In Azure SQL DB, i want to merge records from the staging table to...

SSRS error: The Value for the image 'Image1' has a constant value...

By sgmunson

Full error message: SSRS error: The Value for the image 'Image1' has a constant...

XML_COMPRESSION for existing tables

By zoggling

We are in the process of upgrading to SQL Server 2022 and would like...

Visit the forum

Question of the Day

Adding Defaults

I have a table, called dbo.logger, in SQL Server 2022. I decide to add two new columns to this table with this code.

ALTER TABLE dbo.logger ADD CreateDate DATETIME CONSTRAINT dfGetDate DEFAULT GETDATE()
GO
ALTER TABLE dbo.logger ADD ModifyDate DATETIME DEFAULT dfGetDate
GO
What happens when I run these two batches?

See possible answers