Database Tutorials

How to save the database diagram in SQL Server Object Explorer

Developers can save all the changes they made to a database diagram, including any changes they made to the tables, columns, and other database objects, by saving it. When Developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to save the database diagram, they should follow the next steps:

Learn more

How to insert a new table into a SQL Server database diagram

Developers can add a table to their database diagram to edit its structure or relate it to other tables in their diagram.. When Developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to insert a new table into a database diagram, they should follow the next steps:

1. Make …

Learn more

How to automatically size selected tables in SQL Server diagrams

Developers fit tables in their database diagram to the smallest size that shows all fields. When developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to automatically size selected tables in diagrams, they should follow the next steps:

1. Select the table(s) they want to resize.

2. Right …

Learn more

How to create a clustered unique index in SQL Server databases

Developers can create a clustered index in Microsoft SQL Server databases. In a clustered index, the physical order of the rows in the table is the same as the logical (indexed) order of the index key values. A table can contain only one clustered index. When Developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and …

Learn more

How to add related tables to a diagram in SQL Server

Developers can add a table to their database diagram to edit its structure or relate it to other tables in their diagram.. When Developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to add related tables to a diagram, they should follow the next steps:

1. Add the …

Learn more

How to create an Insert results queries in SQL Server Query Designer

Developers copy rows from one table to another or within a table using an Insert Results query. When they create an Insert Results query, they specify:

– The database table to copy rows to (the destination table).

–  The table or tables to copy rows from (the source table). The source table or tables become part …

Learn more

How to use LINQ orderby clause to sort results in VB.NET

Sometimes Web developers have to sort the returned data. The LINQ orderby clause sorts the elements in the returned sequence according to the default comparer for the type being sorted. For example, the following query can be extended to sort the results based on the FirstName property. Because FirstName is a string, the default comparer performs an alphabetical …

Learn more

How to use LINQ orderby clause to sort results in C#

Sometimes Web developers have to sort the returned data. The LINQ orderby clause sorts the elements in the returned sequence according to the default comparer for the type being sorted. For example, the following query can be extended to sort the results based on the FirstName property. Because FirstName is a string, the default comparer performs an alphabetical …

Learn more

How to identify a SQL Server Express instance

DBA or Developers can use the sqlcmd utility to determine which edition of SQL Server is used for a currently-running instance. Microsoft SQL Server 2005 Express Edition instances display “Express Edition.” DBA or Developers should follow the next steps to determine which edition of SQL Server is used:

1. Connects to an instance of SQL Server by using …

Learn more