Entries for the 'SQL' Category
Two examples of how to import CSV files into SQL Server
[Read more...]
Posted by Derek Trauger on Thursday, May 28, 2009
Essentially a foreign key means that values in one table must also appear in another table. Generally the referenced table is called the parent table while the table with the foreign key is called the child table. The foreign key in the child table will generally reference a primary key in the parent table. To expand this concept a foreign key with a cascade delete means that if a record in the parent table is deleted, then the corresponding record or records in the child table with automatically be deleted. This is referred to as a cascade delete. A foreign key with a cascade delete can be defined in one of two ways either with a CREATE TABLE statement or with an ALTER TABLE statement.
[Read more...]
Posted by Derek Trauger on Wednesday, March 04, 2009
Introduced in SQL Server 2005 , a Common Table Expressions (CTE) is a "temporary result set" that exists only within the scope of a single SQL statement. It allows access to functionality within that single SQL statement that was previously only available through use of functions, temporary tables, and cursors.
[Read more...]
Posted by Derek Trauger on Tuesday, March 03, 2009
|
|