Contact Site map Home

Technical Support
(Historical information only. We hope you find it to be a beneficial resource)

mSQL Tutorial 1

The "Create" Clause

The create clause in mSQL creates a table in your database. If don't yet have a database created please contact us and we'll get you set up.

To create a table you would do the following:

CREATE TABLE table_name (
	col_name	col_type	[not null
	[ , col_name	col_type	[not null
)


An Example:

CREATE TABLE emp_details(
	first_name	char(15) not null,
	last_name	char(15) not null,
	dept	char(20),
	emp_id	int primary key,
	salary	int
)


In this example we are creating a table named "emp_details" (Employee Details). We are defining the first and last names and giving them the type "char" (character) with a length of 15 and a "not null" attribute.

We are defining the "dept" (Department) as a 20 length character type.

Finally we are defining the "emp_id" (Employee ID) as an integer and assigning it as the primary key. We also define the "salary" field as an integer.

Having done this we are ready to insert some data into these fields.

 
 
[ Home ]   [ About ]   [ Plans ]   [ Designs ]   [ Graphics ]   [ Marketing ]   [ Hosting ]   [ Portfolio ]   [ Contact ]   [ Site Map ]
Copyright © 1995-2000 XyNexT Internet Strategies - All Rights Reserved Worldwide