Quackit Logo
FREE Hosting!
With every domain you register with ZappyHost you get FREE hosting.
Create free Flash websites

SQL Create

Print Version

Most database systems provide a way for you to create database objects via a WYSIWYG interface. For example, Microsoft's SQL Server has Enterprise Manager. The Enterprise Manager gives you a kind of graphical representation of your database system. You can browse through your databases, view the tables and their contents etc.

Despite having a tool like Enterprise Manager to make these tasks easier, there can be good reasons for wanting to perform some of these tasks programatically. Possible reasons could include:

  • Your application allows users to create objects on the fly.
  • You have multiple environments (for example development, staging, production). It's much easier, and less error prone, to run a script against 3 environments than to open up Enterprise Manager and repeat the steps in 3 environments - especially if you have lots of changes.
  • You don't have access to Enterprise Manager (or your database system's equivalent).

Fortunately, SQL has a number of CREATE commands that enable you to programatically create database objects including the database, its tables and more.

Here are the CREATE commands supported by SQL Server:

  • CREATE ACTION
  • CREATE CACHE
  • CREATE CELL CALCULATION
  • CREATE CUBE
  • CREATE DATABASE
  • CREATE DEFAULT
  • CREATE FUNCTION
  • CREATE INDEX
  • CREATE MEMBER
  • CREATE MINING MODEL
  • CREATE PROCEDURE
  • CREATE RULE
  • CREATE SCHEMA
  • CREATE SET
  • CREATE STATISTICS
  • CREATE TABLE
  • CREATE TRIGGER
  • CREATE UNIQUE CLUSTERED INDEX
  • CREATE VIEW

We're not going to cover all these here but, over the next few lessons, we'll cover some of the most common CREATE commands.

Enjoy this website?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Help support Quackit by making a donation

Oh, and thank you for supporting Quackit!

Need Website Content?
Get unique, quality digital content for your website.
  • 270+ Website Templates
  • 800+ Flash Templates
  • 25,000+ Images, Logos
  • 30,000+ e-Books
  • 15,000+ Scripts
  • 27,000+ Animated GIFs
  • 21,000+ Ringtones
  • ...and much more!
Get your content now!
$1.99 .info domain names!
© Copyright 2000 - 2010 Quackit.com