M
MD
Hey, I want to set one of my columns as a foreign key with no index when I
create it in my CREATE TABLE statement. However, I keep getting errors and
can not figure out where I am supposed to put the NO INDEX in my statement.
Basically, I have CREATE TABLE tablename(field1 STRING CONSTRAINT
PK_tablename PRIMARY KEY, field2 STRING CONSTRAINT FK_tablename_field2
REFERENCES foreigntable (foreignfield) ON UPDATE CASCADE ON DELETE CASCADE,
field3 STRING) . This works fine, but I do not want field2 indexed, which
this does.
create it in my CREATE TABLE statement. However, I keep getting errors and
can not figure out where I am supposed to put the NO INDEX in my statement.
Basically, I have CREATE TABLE tablename(field1 STRING CONSTRAINT
PK_tablename PRIMARY KEY, field2 STRING CONSTRAINT FK_tablename_field2
REFERENCES foreigntable (foreignfield) ON UPDATE CASCADE ON DELETE CASCADE,
field3 STRING) . This works fine, but I do not want field2 indexed, which
this does.