T-SQL Query to find SQL database age and number of tables in SQL Server
SQL Server - The following T-SQL statement helps find the SQL Database age based on the created date and number of tables.
2022-01-18
18 reads
SQL Server - The following T-SQL statement helps find the SQL Database age based on the created date and number of tables.
2022-01-18
18 reads
The T-SQL script takes a full backup of all databases(System databases and user databases) in the format of DataaseName-YYYY-MM-DD-HH-MM-...
2022-01-18
43 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2022-01-17
24 reads
Every Database has a DBO or database owner set. Sometimes the owner is invalid, while most of the time the DBO is perfectly normal. It is easy to ignore...
2022-01-17 (first published: 2022-01-05)
679 reads
This topic describes how to change the availability mode of an availability replica in an Always On availability group in SQL Server by usin
2022-01-17
28 reads
Friends, the MidnightDBAs have a plan for 2022. A capital-P Plan. And it involves writing and teaching a lot. The […]
The post Learn some critical SQL Security with the...
2022-01-17
37 reads
I’ve been working on a project to populate an Operational Data Store using Azure Data Factory (ADF). We have been seeking to tune our pipelines so we can import...
2022-01-17 (first published: 2022-01-06)
194 reads
NULLIF is a SQL function that is used to compare two columns. Use NULLIF to compare two columns and return NULL if they are equal to each ot
2022-01-17
19 reads
This blog troubleshoots SQL Server Error Msg 3132, Level 16, State 1 while backing up SQL Database.
2022-01-17
37 reads
When you are experiencing SQL Server Error Msg 3231, Level 16, State 1 while backing up SQL Database, it is important to troubleshoot the er
2022-01-17
471 reads
By gbargsley
It's 2 AM. Your phone is going off. Users can't connect to the application,...
By Steve Jones
I discovered a procedure recently that I wasn’t aware of: sp_sequence_get_range. This post looks...
By Arun Sirpal
After a year away getting to grips with AI and its application across the...
Fisher Phillips is looking for a Financial Systems Administrator to help support and improve our financial...
Employee owned company, been around for over 50 years. Hybrid opportunity, looking folks in Pacific...
i have huge table with lot of data and is also wide. i took...
I want to create a JSON document that contains data from this table:
TeamID TeamNameCity YearEstablished 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960If I run this code, what document(s) is/are returned?
SELECT json_objectagg( n.city : n.TeamName) FROM dbo.NFLTeams;See possible answers