は私のコードは、私は複数のテーブルを作成しようとしている、次のとおりです。Microsoft Accessでテーブル構文エラーを作成しますか?ここ
Create Table Order_t
(
Id AutoIncrement Not Null,
OrderDate DateTime Not Null,
CustId Int Not Null,
Primary Key(Id),
Foreign Key(CustId) References Customer_t(Id)
(;
Create Table PersonRole_t
(
PersonRoleID Autoincrement Not Null,
Person_ID int Not Null,
Primary Key(PersonRoleID, Person_ID),
Foreign Key(Person_ID) References Person_T(Person_ID)
(;
Create Table Product_t
(
Id Text(10) Not Null,
Name Text(30) Not Null,
Description Text(30),
Finish Text(30),
UnitPrice Currency Not Null,
Primary Key(Id)
) ;
私はMicrosoft Accessでそれを実行するたびに、私は(それがPersonRole_Tのテーブル定義を強調して)CREATE TABLE文でエラーが発生します。何をすべきかわからず、SQLでは初めてです。 Person_ID
のキーを持つ代わりにOPEN
括弧
Create Table Order_t
(
Id AutoIncrement Not Null,
OrderDate DateTime Not Null,
CustId Int Not Null,
Primary Key(Id),
Foreign Key(CustId) References Customer_t(Id)
); -- Not (;
Create Table PersonRole_t
(
PersonRoleID Autoincrement Not Null,
Person_ID int Not Null,
Primary Key(PersonRoleID, Person_ID),
Foreign Key(Person_ID) References Person_T(Person_ID)
); -- Not (;
OPの明白な点を述べるだけで、Access SQL構文はコメントをサポートしていないので、実行時には不要な部分を削除する必要があります。 – onedaywhen