How do I 'DROP' and unamed relationship/constraint in MS Access with SQL?

后端 未结 4 1789
栀梦
栀梦 2021-01-19 18:32

I have a Microsoft Access database and I have two tables. Table1 has a primary key and Table2 has a foreign key that references Table1\'s primary key. This relationship is s

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-19 19:07

    Determine the relationship using

    SELECT szRelationship FROM Msysrelationships WHERE szObject = 'childtablename' and szReferencedObject = 'parenttablename'

    THEN

    Use the ALTER TABLE command. Something along the line of this

    ALTER TABLE Table2 DROP CONSTRAINT Relation1

提交回复
热议问题