Click to See Complete Forum and Search --> : building tables with a GUI


getret
10-03-2006, 04:11 PM
i'm taking a class called database processing, and we are learning a bit of SQL (mostly database theory though). i'm struggling to get a table to work, and my professor tells me i need to build it with some GUI. i have no idea what he's talking about, and i can't find anything about it anywhere. i would just ask him, but he's not super fast to respond (this is an online course) and i need to kno a.s.a.p.

anyone know about this?

EDIT: here are some screenshots of what i'm trying to build. i know that there isn't supposed to be multiple primary keys, but for some reason he says this is doable with this GUI tool i can't find.
Oh, this is the SQL 2005 (or something like that).
http://www.rusmannx.com/address.JPG

and here is the other.
http://www.rusmannx.com/phone.JPG

NogDog
10-03-2006, 07:02 PM
You cannot have multiple primary keys, but you can define your primary key to consist of more than one field:

CREATE TABLE table_name (
col1 VARCHAR(32),
col2 VARCHAR(64),
col3 VARCHAR(16),
col4 VARCHAR(24),
PRIMARY KEY (col1, col2)
);

getret
10-04-2006, 10:20 PM
ok, i know about the primary keyS thing (my first post).

can someone just help me figure out this GUI tool? where do access it?
dumb it way down for me please.

aussie girl
10-05-2006, 06:26 AM
ok, i know about the primary keyS thing (my first post).

can someone just help me figure out this GUI tool? where do access it?
dumb it way down for me please.

He's probably talking about creating tables with Enterprize Manager,
Start->Microsoft SQL Server->Enterpize Manager click on the small + signs to expand the server, find the database that you, want expand that, right click on Tables and select new table, it's similiar to Access, enter in the details highlight the column that you want as primary key then click the little key icon in the menu...