Finding table size in a database

August 20, 2007

I found this bit of code on http://www.databasejournal.com/img/BigTables.sql for finding the size a tables in a database on MS SQL Server. Really handy for finding out which tables are using up all the disk space! /********************************… Read more »

String Manipulation in MS SQL Server

August 11, 2007

I found a great article about string manipulation in SQL Server http://www.informit.com/articles/article.asp?p=25040&rl=1 Read more »

Create Table with Incremental Primary Key with Access

August 02, 2007

Create Table with Incremental Primary Key Create Table [Courses] ( [course_id] Counter NOT NULL, [course_title] text(100) NOT NULL, [course_date] datetime NOT NULL, [course_description] memo NOT NULL, [course_places] int NOT NULL, [cou… Read more »

MS SQL Samples

August 01, 2007

Rename a table Exec sp_rename [CurrentTableName], [NewTableName] Rename column EXEC sp_rename '[tablename].[CurrentColumnName]', 'NewColumnName', 'COLUMN' Add a primary key to a table BEGIN TRANSACTION SET QUOTED_IDENTIFIER ON SET ARITHA… Read more »