What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » MS SQL questions

MS SQL questions
Author: Message:
Wabz
Elite Member
*****

Avatar
Its Groovy Baby!

Posts: 3459
Reputation: 29
39 / Male / Flag
Joined: Jan 2003
O.P. MS SQL questions
Hey guys I'm making a database in Enterprise manager :S

I'm trying to create some tables  but need to create a compound key any ideas how to do this because I'm not too sure

code:


Create table tblhelp (
date datetime not null,
helpid varchar(3) not null,
helplocation varchar(10) not null,
random int,
spacefiller varchar(18),
)




date, helpid, and helplocation all need to be a compound key for the tables to work properly.  (Although this isn't really my table because I'd just confuse myself if I used the real thing at the moment.)

Any ideas guys
Mess.be Forum Moderator
Messenger Plus ex-IRC Network Admin
Gimme a Rep!
03-22-2006 11:31 AM
Profile E-Mail PM Web Find Quote Report
Adeptus
Senior Member
****


Posts: 732
Reputation: 40
Joined: Oct 2005
RE: MS SQL questions
code:
CREATE TABLE tblhelp (
date datetime NOT NULL,
helpid varchar(3) NOT NULL,
helplocation varchar(10) NOT NULL,
random int,
spacefiller varchar(18),  /* what the heck is this? */
CONSTRAINT pk_tblhelp PRIMARY KEY (date, helpid, helplocation)
)


Documentation available at http://msdn.microsoft.com/library/en-us/tsqlref/ts_create2_8g9x.asp

This post was edited on 03-23-2006 at 12:15 AM by Adeptus.
03-23-2006 12:14 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On