Reference: http://blogs.msdn.com/b/felixmar/archive/2011/02/14/partitioning-amp-archiving-tables-in-sql-server-part-1-the-basics.aspx Database partitioning is a feature available in SQL Server(version 2005 and Up) which lets you split a table among m…
Reference: http://blogs.msdn.com/b/felixmar/archive/2011/08/29/partitioning-amp-archiving-tables-in-sql-server-part-2-split-merge-and-switch-partitions.aspx In the 1st part of this post, I explained how to create a partitioned table using a partition…
Temporary tables in SQL Server…
--Comparing data between two tables in SQL Server --Create two Tables-- CREATE TABLE TableA(ID Int, ProuctName Varchar(256)) GO CREATE TABLE TableB(ID Int, ProuctName Varchar(256)) GO INSERT INTO TableA VALUES(1,'A') INSERT INTO TableA VALUES(2,'B')…
Complete list of Microsoft SQL Server trace flags (585 trace flags) REMEMBER: Be extremely careful with trace flags, test in your test environment first. And consult professionals first if you are the slightest uncertain about the effects of your cha…
SQL Server 中维护了一组表用于存储 SQL Server 中所有的对象.数据类型.约束条件.配置选项.可用资源等信息,这些信息称为元数据信息(Metadata),而这些表称为系统基础表(System Base Tables).在这些基础表中,存在于 master 数据库中的一部分基础表包含系统级范围的信息.存在于特定数据库(也包含 master db)中的基础表包含属于该特定数据库的对象和资源信息. 使用系统管理员身份登录,可以从 sys.objects 中查询所有的系统基础表. US…
SELECT * FROM sys.all_columns --显示属于用户定义对象和系统对象的所有列的联合--https://docs.microsoft.com/zh-cn/sql/relational-databases/system-catalog-views/sys-all-columns-transact-sql?view=sql-server-2016SELECT * FROM sys.all_objects--显示所有架构范围内的用户定义对象和系统对象的 UNION--https…
sys.columns视图 sys.columns是SQL Server从2005版本起引入的新的系统级视图.相关链接如下: Mapping SQL Server 2000 System Tables to SQL Server 2005 System Views https://docs.microsoft.com/zh-cn/previous-versions/sql/sql-server-2005/ms187997(v=sql.90) sys.columns vs syscolumns h…
https://www.codeproject.com/Articles/630346/Understanding-how-SQL-Server-executes-a-query https://www.codeproject.com/Articles/732812/How-to-analyse-SQL-Server-performance     This article will help you write better database code and will help you ge…
Databases- A database is a structured collection of data.- Database can be thought as simple data file.- It is more powerful than data file which stores data in organized way.- Database organizes the data into a table. It is made up of several tables…