List Table Foreign Keys, Primary key and indexes
This procedure let you list [optional] by table:
-Foreign keys
-Primary key
-Indexes
2015-03-27 (first published: 2014-02-06)
4,089 reads
This procedure let you list [optional] by table:
-Foreign keys
-Primary key
-Indexes
2015-03-27 (first published: 2014-02-06)
4,089 reads
Get all the dependent tables for a master table up to N level(Till the leaf ) you can either find dependency or you can find all the child tables.
2015-03-09 (first published: 2013-09-04)
3,402 reads
This script will attempt to re-trust untrusted foreign keys and will report counts of successes and failures.
2013-06-17 (first published: 2013-05-30)
1,184 reads
2013-04-24
2,088 reads
Rename Foreign Key Constraints in a consistent manner. Ideal for preventing constraint errors during code promotion.
2015-02-09 (first published: 2013-03-19)
1,390 reads
2012-10-23
2,194 reads
2012-10-12 (first published: 2012-09-10)
1,814 reads
2012-05-18
3,010 reads
2011-10-25
2,498 reads
This is a script to find all constraints and check if they are enabled or disabled.
2011-11-03 (first published: 2011-10-12)
7,910 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, which is...
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