How to Reindex a SQL Table
Use this to reindex tables in SQL.DBCC DBREINDEX('TableName',' ',90)
View ArticleSql Identity Retrieval - Alternative Methods
Has anyone ever had an issue returning a value for @@Identity? If so, here is one work around that you can try.Basic Insert Statement:-- Run Me INSERT INTO dbo.tbl_X (Storename) VALUES( 'test qae3')...
View ArticleHow to execute a SQL Statement using a Cross Server Call
How to execute a SQL Statement using a Cross Server Call.Declare @sqltxt nvarchar(500) -- Create SQL statementSet @sqltxt = 'UPDATE DatabaseName.dbo.Table SET Active = 0 WHERE...
View ArticleHow to Defrag SQL Table Indexes
If you are experianceing any slowdowns with your SQL queries, then it might be time to defrag your database tables. The SQL code listed below will defrag the indexes on a SQL table.Run this for each...
View ArticleInsert Data and Primary Key value in to a table
How to insert data and a primary key value into a table. SET IDENTITY_INSERT tblData ONInsert into tblData (pkVal, Val1, Val2)Select pkVal, Val1, Val2 from tblData2 where x=ySET IDENTITY_INSERT...
View ArticleWhat is a Relational Database Management System (RDBMS)?
A Relational Database Management System (RDBMS) can also be called a traditional database that uses a Structured Query Language (SQL) to provide access to stored data while insuring the integrity of...
View ArticleMicrosoft Sql Server 2008 R2 System Databases
For a majority of software developers little time is spent understanding the inner workings of the database management systems (DBMS) they use to store data for their applications. I personally place...
View Article