Can someone please tell me the MsSQL equivalent of this MySQL statement:
Code:
CREATE TABLE `test` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(5),
`foreign_key` INT UNSIGNED NOT NULL DEFAULT '0',
UNIQUE INDEX (`name`),
INDEX (`foreign_key`)
);
I'm having a problem with the INDEX part. Here is what I have:
Code:
CREATE TABLE test (
id INT NOT NULL IDENTITY PRIMARY KEY,
name VARCHAR(5),
foreign_key INT NOT NULL DEFAULT '0',
UNIQUE (name),
INDEX (foreign_key)
);
Thanks.