I use the following script to setup a new table for each domain on my SQL
7.0 Server.  However I want to use it to edit already existing tables
without deleting the table or losing any of the data already in said table.
Does anyone have a script that does this ready to go?

Also, is there a easy way to index all tables for multiple fields using a
script?  How necessary is it to index the tables anyway?

Tim D




if exists (select * from sysobjects where id = object_id('dbo.mydomain_com')
and sysstat & 0xf = 3)
        drop table dbo.mydomain_com
GO

CREATE TABLE dbo.mydomain_com (
        USERID varchar (50) NULL ,
        PASSWORD varchar (30) NULL ,
        FULLNAME varchar (80) NULL ,
        USERDIR varchar (80) NULL ,
        MAILADDR varchar (50) NULL ,
        MAXSIZE int NULL ,
        MAXMSGS int NULL ,
        FLAGS int NULL ,
        TYPE int NULL ,
        FirstName varchar (50) NULL ,
        LastName varchar (50) Null ,
        Age varchar (15) NULL ,
        Sex varchar (15) NULL ,
        Company varchar (100) NULL ,
        Street1 varchar (100) NULL ,
        Street2 varchar (100) NULL ,
        City varchar (50) NULL ,
        State varchar (50) NULL ,
        Zip varchar (50) NULL ,
        Country varchar (50) NULL ,
        Phone varchar (50) NULL ,
        Fax varchar (50) NULL ,
        ReferredBy varchar (50) NULL ,
        BackupEmail varchar (50) NULL
)






_______________________________________________________________
Sent using Novelty Mail the FREE EMAIL SERVICE. Click here http://noveltymail.com to 
get your own free email using this or ANY of our fun domain names.

Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/

Reply via email to