April 17, 2008  8:00 AM

SQL 2008 one click database encryption gives a false sense of security



Posted by: Denny Cherry
Compliance, DataManagement, Encryption, SQL Server 2008

While I think that the one click database encryption that Microsoft has built into SQL Server 2008 is a good idea, but I'm not sure how useful it actually is.  It's touted as giving you data encryption of the entire database without any code change. What this actually means is that if someone...


April 7, 2008  11:00 AM

SQL Server 2008 changes the way that CONVERT/CAST works



Posted by: Denny Cherry
Query tuning, SQL, SQL Server 2008

Normally when running a query against a table and using a CAST or CONVERT function against a datetime field any index is made useless.  In SQL Server 2008 this problem is fixed.  Microsoft has come up with a way for SELECT statements which use CAST or CONVERT against a column of the datetime...


April 3, 2008  11:00 AM

New INSERT syntax in SQL Server 2008



Posted by: Denny Cherry
INSERT statement, SQL Server 2008, T/SQL

One of the very cool new feature which SQL Server 2008 gives us is an change to the INSERT statement.  Now you can specify multiple rows to insert into a table from a single insert command. The syntax is: CREATE TABLE TableName (Column1 INT, Column2 VARCHAR(10)) INSERT INTO...


March 31, 2008  10:00 AM

Back To Basics: The UPDATE Statement



Posted by: Denny Cherry
Back To Basics, SQL, SQL Server 2000, SQL Server 2005, SQL Server 2008, T/SQL, UPDATE

After you've inserted the data into the table, it's time to update the data.  We do this by using the UPDATE statement.  The update statment can be used in two ways.  The first is to update a record or set of records in a single table, by simply filtering the data in the table by using values...


March 24, 2008  10:00 AM

Back To Basics: The INSERT Statement



Posted by: Denny Cherry
Back To Basics, INSERT statement, SQL, SQL Server 2000, SQL Server 2005, SQL Server 2008, T/SQL

While the SELECT statement is probably the most important command, the INSERT comes in handy.  The INSERT statement is used to do exactly what it sounds like, it inserts data into a table.  There are two ways to insert data into a table.  The first is to pass in each of the values, and the...


March 17, 2008  11:00 AM

Back To Basics: Using Common Table Expressions



Posted by: Denny Cherry
Back To Basics, Common Table Expressions, CTE, SQL, SQL Server 2005, SQL Server 2008, T/SQL

CTEs (Common Table Expressions) are one of the very cool features introduced in SQL Server 2005.  In there simplest most common form, think of them as a temporary single use view who's context is only within the command which follows them directly.  The syntax of a CTE is very...


March 13, 2008  8:00 AM

SQL 2008 prevents schema changes if the table must be dropped



Posted by: Denny Cherry
Config, SQL, SQL Server 2008, SSMS

When editing the table schema in the SQL Server 2008 UI and the required change requires that the table needs to be dropped and recreated by default the UI will not let you make the change. The kinds of changes that would require that the table be dropped and recreated would be inserting a...


March 10, 2008  10:00 AM

Back To Basics: The SELECT Statement



Posted by: Denny Cherry
Back To Basics, SELECT statement, SQL, SQL Server 2000, SQL Server 2005, SQL Server 2008, T/SQL

There are four basic commands in databases.  They are SELECT, INSERT, UPDATE and DELETE.  Probably the most important of these is the SELECT command.  The SELECT command is how the data in the database is retrieved and displayed. (All these code samples can be run on all versions of Microsoft...


March 3, 2008  10:00 AM

T/SQL Back To Basics



Posted by: Denny Cherry
Back To Basics, SQL, SQL Server 2000, SQL Server 2005, SQL Server 2008

I've seen a lot of posts online over the last few weeks with people asking about basic query syntax.  So over the next few posts I'm going to show some basic T/SQL queries as well as some more "advanced" features and syntaxes. Hopefully you'll find these syntaxes useful. All the code...