如何创建外键
从表tGeoAnswers列’locationId’
表tLocations列“ ID”?
ALTER TABLE tGeoAnswers ADD FK_Answer_Location FOREIGN KEY (locationId) REFERENCES tLocations(id)
我正在尝试找到的这段代码,但出现以下错误:
“ FK_Answer_Location”列的定义必须包含数据类型
ALTER TABLE tGeoAnswers ADD CONSTRAINT FK_Answer_Location ...
否则,假设您要添加名为的列FK_Answer_Location。
FK_Answer_Location