Web developer uses LINQ join clause when he/she wants to associate elements from different source sequences that have no direct relationship in the object model. For example, an electronic devices distributor might have a list of suppliers of a certain product, and a list of buyers. A join clause can be used, for example, to create a list …
Database Tutorials
Web developers use LINQ join clause when he/she wants to associate elements from different source sequences that have no direct relationship in the object model. For example, an electronic devices distributor might have a list of suppliers of a certain product, and a list of buyers. A join clause can be used, for example, to create a list …
Web developer can use LINQ group clause to group his/her results based on a key that he/she specifies. For example Web developer could specify that the results should be grouped by the City so that all clients from New York or San Francisco are in individual groups. In this case client.City is the key.
Dim qryClientsByCity = From client …
Web developers can use LINQ group clause to group their results based on a key that they specify. For example Web developers could specify that the results should be grouped by the City so that all clients from New York or San Francisco are in individual groups. In this case client.City is the key.
var qryClientsByCity =
from …
Developer can use Table Designer in SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 to create a new table, name it, and add it to an existing database by following the next steps:
1. Right-clicks the Tables node of his/her database in Object Explorer and click New Table.
2. Types column …
Developer can use Table Designer in SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 to delete a table from the existing database by following the next steps:
1. In Object Explorer selects the table he/she wants to delete.
2. Right-clicks the table and chooses Delete from the shortcut menu.
3. …
How to use SQL Server command sqlcmd to run a Transact-SQL script file
Developers should use sqlcmd to connect to a named instance of Microsoft SQL Server first and after they can run Transact-SQL script file. A Transact-SQL script file is a text file that can contain a combination of Transact-SQL statements, sqlcmd commands, and scripting variables. To run the script file, developers should follow the next steps:
1. Open …
How to use SQL Server command sqlcmd to save output to a text file
Developers can run a Transact-SQL script file, by saving its output to a text file. In this case, developers should follow the next steps:
1. Open a command prompt window.
2. In the Command Prompt window, type:
sqlcmd -S server\instance -i C:\script.sql –o C:\result.txt
Where server is SQL server name, instance is SQL instance …
Developers can rename a table in SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 Table Designer, by following the next steps:
1. In Object Explorer, right-click the table they want to rename and choose Design (Modify in SP1 or earlier).
The table opens in the Table …
How to insert columns into a table with SQL Server Table Designer
Developers can use SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 Table Designer to add new columns to a table. When developers open a table in Table Designer, they see all of its currently defined columns as well as a blank row at the bottom of the table definition grid. They can add …