There are many ways to find out of this result, here we mentioned 2 best methods among them. First of all you run this query for fetching all table names and using these table names you can make a query for fetching all rows count of a particular database.
select 'selct @cnt = @cnt + count(*) from '+ name from sysobjects where xtype='u'
by using this you can generate some queries for fetching rows count of every table, copy its result and paste on query editor window and then you can use a simple trick to add all table’s rows count like this…
declare @cnt int
set @cnt = 0
select @cnt = @cnt + count(*) from tbl1
select @cnt = @cnt + count(*) from tlb2
select @cnt = @cnt + count(*) from tlb3
select @cnt = @cnt + count(*) from tlb4
select @cnt = @cnt + count(*) from tlb5
select @cnt = @cnt + count(*) from tlb6
select @cnt = @cnt + count(*) from tlb7
by using this method you will find all database’s … Click here to continue…..
They specify a search condition for a group or an aggregate. But the difference is that HAVING can be used only with the SELECT statement. HAVING is typically used in a GROUP BY clause. When GROUP BY is not used, HAVING behaves like a WHERE clause. Having Clause is basically used only with the GROUP BY function in a query whereas WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.
Delete command removes the rows from a table based on the condition that we provide with a WHERE clause. Truncate will actually remove all the rows from a table and there will be no data in the table after we run the truncate command. TRUNCATE TRUNCATE is faster and uses fewer system and transaction log resources than DELETE. TRUNCATE removes the data by deallocating the data pages used to store the table’s data, and only the page deallocations are recorded in the transaction log. TRUNCATE removes all rows from a table, but the table structure, its columns, constraints, indexes and … Click here to continue…..
Log shipping is the process of automating the backup of database and transaction log files on a production SQL server, and then restoring them onto a standby server. Enterprise Editions only supports log shipping. In log shipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and can be used this as the Disaster Recovery plan. The key feature of log shipping is that it will automatically backup transaction logs throughout the day and automatically restore them on the … Click here to continue…..