How to Count the Number of Rows for User and System Tables of a Database
Get row counts for every user and system table in a SQL Server database instantly from catalog metadata, and know when you need an exact COUNT instead.
#t-sql
Articles
page 9 / 13
Get row counts for every user and system table in a SQL Server database instantly from catalog metadata, and know when you need an exact COUNT instead.
#t-sql
Create an Oracle database the current way: build a container database with DBCA, add pluggable databases with CREATE PLUGGABLE DATABASE, then verify, connect and drop them.
#windows-10
Find out how much disk space a SQL Server database, table or index uses with sp_spaceused and sys.dm_db_partition_stats, and read the numbers correctly.
#t-sql
Use ASCII, CHAR, NCHAR, CHARINDEX, LEFT, LEN, LOWER, LTRIM and DIFFERENCE correctly in SQL Server, with examples, results and the pitfalls of each.
#t-sql
Create, alter and drop views in SQL Server, update data through them safely, and understand schema binding, indexed views, permissions and common mistakes.
#t-sql
Find failed SQL Server logins in the error log, read the error 18456 state codes, check SQL logins with LOGINPROPERTY, and set up a lasting audit.
Number rows with ROW_NUMBER() in SQL Server, then use it to get the latest row per group, delete duplicates and page results without surprises.
#t-sql
Install IBM Db2 with the free Community Edition container image or the Windows and Linux setup wizard, check edition limits, verify the instance and fix common setup errors.
#windows
Write a MySQL CREATE TABLE statement with sensible data types, keys and constraints, check the result, fix the common errors and drop the table safely.
Do arithmetic in a T-SQL SELECT and avoid the usual traps: integer division, NULL results, divide-by-zero errors, overflow, rounding and float inaccuracy.
#t-sql
Create a MySQL database with the right character set and collation, add an application user with limited grants, verify the result and fix the usual errors.
#mysql-5.7
Sort SQL Server results by one or more columns, control where NULLs land, page with OFFSET and FETCH, and fix the common ORDER BY errors.
#t-sql