How to create a table inside a database in your MSDE database?

 

The databases are located in the C:\MSSQL7\DATA directory with an "mdf" extension associated to a log file having a "ldf" extension.

We recommend creating any table using directly the ClicknDECiDE Builder Output format to the Local Database.

Nevertheless, if you want to create it manually, for example create a table MYTABLE inside the testdb database, do the following: (make sure to use Uppercase character if Uppercase is required in the next command lines, such –U –P or -Q)

 

Open a DOS Windows

Go to the C:\MSSQL7\BINN directory

Type the command:

OSQL –U sa

Press <Enter>

You will be prompted to enter a Password:

Press <Enter>

You will receive a command line as follow:

1>

Write the command:

1> create table testdb.dbo.mytable (field1 char (20), field2 integer, field3 float, field4 datetime)

Press <Enter>, you will receive a new command line:

2>

Write the command:

2> go

Press <Enter>.

As you can see in the above example you must know the type of each field, so it could be easier to make it with ClicknDECiDE Builder.