To get number of records per minutes, means gouping on minutes in a given timeframe.

Some time while reviewing a log file, especially any error log of something like that, we need to find you that how much is error rate per minute, the following piece of code is used for retrieving information for every minute. Let's create an Error log table. CREATE TABLE Errorlog ( logid INT identity(1, 1) … Continue reading To get number of records per minutes, means gouping on minutes in a given timeframe.

Which table is having maximum number of colums

The following script can be used to fetch the tables having maximum number of columns in sql server tables. SELECT st.NAME 'Table Name' ,count(sc.NAME) AS 'No of columns' FROM sys.columns sc WITH (NOLOCK) INNER JOIN sys.tables st WITH (NOLOCK) ON sc.object_id = st.object_id GROUP BY st.NAME ORDER BY 'No of columns' DESC   Thanks Manish … Continue reading Which table is having maximum number of colums