Create Table DDL via TSQL
A stored procedure from longtime community member Lowell Izaguirre, returns the CREATE TABLE definition for any table, including PK, UQ, Identity, FK, Defaults, and more.
2019-04-16
17,538 reads
A stored procedure from longtime community member Lowell Izaguirre, returns the CREATE TABLE definition for any table, including PK, UQ, Identity, FK, Defaults, and more.
2019-04-16
17,538 reads
Use Powershell to query AD for Users, Groups and GroupMembers
2018-04-27 (first published: 2016-03-31)
31,145 reads
Here a quick script showing how to get all the Active Directory users in a AD group.
2017-02-24 (first published: 2016-03-17)
9,018 reads
Changing Database Collation Through Primary keys, Foreign Keys, Default and Check Constraints and more.
2016-03-07
4,373 reads
How to reverse engineer or script a trace for disaster recovery, or simply scripting for enhance and adjustment.
2010-03-23
2,096 reads
By Arun Sirpal
“What exactly did it do on my server?” is the first question a DBA...
By James Serra
Microsoft shared a broad set of Fabric, Power BI, and SQL updates at FabCon...
By Steve Jones
No, I’m not quitting or retiring. Just going on vacation, but I leave tonight...
Comments posted to this topic are about the item Let's Talk Certifications
Comments posted to this topic are about the item The Hidden Security Risks of...
Comments posted to this topic are about the item The Empty Aggregate
I have this table in a SQL Server 2025 database:
CREATE TABLE [dbo].[CustomerOrder] ( [OrderID] [int] NULL, [CustomerID] [int] NULL, [total] [money] NULL ) ON [PRIMARY] GOWhat is returned from this code? (answers are for the sum and then the count)
SELECT SUM(total) AS sum,
COUNT(total) AS count
FROM dbo.CustomerOrder;
See possible answers