SQL Server – How to get last access/update time for a table
Modify date and create date for a table can be retrieved from sys.tables catalog view. When any structural changes are made the...
2014-03-11
293 reads
Modify date and create date for a table can be retrieved from sys.tables catalog view. When any structural changes are made the...
2014-03-11
293 reads
I made a couple of changes in the order of the queries this month and made some other small improvements...
2014-03-11
1,687 reads
It’s time for T-SQL Tuesday, this month hosted by Michael J Swart, our artistic DBA in the community. I love...
2014-03-11
949 reads
It is T-SQL Tuesday again and this month we are taking the road less traveled. Michael J Swart (b/t) has...
2014-03-11
1,297 reads
Many people see CXPACKET at the top of their waits and start trying to fix it. I know this topic’s...
2014-03-11
1,620 reads
This is a special edition for SQL Snacks. It is one (of many hopefully) SQL Snacks that has been recorded...
2014-03-10
923 reads
Fellow DBA: There are so many alerts! It takes me a long time to get through them all. How do...
2014-03-10
674 reads
I’d be struggling to remember a week where I hadn’t run a query against the dmv sys.dm_db_index_usage_stats to find unused...
2014-03-10 (first published: 2014-02-27)
3,246 reads
It’s Monday time for this week’s weekly link round-up. If you want to catch these links “live” (so exciting), follow...
2014-03-10
936 reads
One of the weaknesses of the current SQLSaturday tool set is that the front page isn’t strong by default. It...
2014-03-10
317 reads
By James Serra
Making Data AI-Ready, Part 3 (This is the final article in a three-part series...
By Steve Jones
I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers