Sql query to get all table records count from a database

sQL query to get all table records count from a database DECLARE @TableRowCounts TABLE ([TableName] VARCHAR(128), [RowCount] INT) ; INSERT INTO @TableRowCounts ([TableName], [RowCount]) EXEC sp_MSforeachtable ‘SELECT ”?” [TableName], COUNT(*) [RowCount] FROM ?’ ; SELECT [TableName], [RowCount] FROM @TableRowCounts ORDER BY [TableName] GO

Sql query to get all table records count from a database Read More

Sql desc

sql asc Used with ORDER BY to return the data in ascending order. Example: Apples, Bananas, Peaches, Raddish sql desc Used with ORDER BY to return the data in descending order. Example: Raddish, Peaches, Bananas, Apples MySQL ORDER BY SELECT select_list FROM table_name ORDER BY column1 [ASC|DESC], column2 [ASC|DESC], …; mysql order by To get […]

Sql desc Read More