logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Clairvoyance: 08:00 PM

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

Create a Table with SQL Syntax


Need to create a table to put data in? It's very easy to put together SQL Syntax to build the table to store your newsletter members, poll votes, or more.

To start with, get a connection to your databse using ODBC, Access, PowerBuilder, or whatever other tool you use. Open up a SQL window so you can submit a SQL command to your database.

Now for the syntax. The general syntax to create a table is

CREATE TABLE tablename (field1 type1, field2 type2, field3 type3 ...);

So let's say you want to create a table called MEMBERS which holds your newsletter members in it. The fields you are tracking are memb_email, memb_date to know when each person joined you. You would say:

CREATE TABLE members (memb_email varchar(50), memb_date datetime);

The most commonly used field types are:

int
char(#)
varchar(#)
datetime

The char field is best used when you are always going to have a set number of letters. So this is good to use for char(1) if you are doing a nl_type of H for HTML and T for text. The varchar field is best used when the character lengths will always be different, such as when you are taking in email addresses of varying lengths.

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.
Add Create+a+Table+with+SQL+Syntax to Twitter Add Create+a+Table+with+SQL+Syntax to Facebook Add Create+a+Table+with+SQL+Syntax to MySpace Add Create+a+Table+with+SQL+Syntax to Del.icio.us Digg Create+a+Table+with+SQL+Syntax Add Create+a+Table+with+SQL+Syntax to Yahoo My Web Add Create+a+Table+with+SQL+Syntax to Google Bookmarks Add Create+a+Table+with+SQL+Syntax to Stumbleupon Add Create+a+Table+with+SQL+Syntax to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor