Knowee
Questions
Features
Study Tools

Error starting at line : 10 File @ /oracle.sqlIn command -alter table BORROWERS drop primary key(AuthorID)Error report -ORA-01735: invalid ALTER TABLE option01735. 00000 - "invalid ALTER TABLE option"*Cause: *Action:

Question

Error starting at line : 10 File @ /oracle.sqlIn command -alter table BORROWERS drop primary key(AuthorID)Error report -ORA-01735: invalid ALTER TABLE option01735. 00000 - "invalid ALTER TABLE option"*Cause: *Action:

🧐 Not the exact question you are looking for?Go ask a question

Solution

The error message you're seeing, ORA-01735, is an Oracle SQL error that indicates you're trying to use an invalid option with the ALTER TABLE command.

In your case, you're trying to drop a primary key from the BORROWERS table. However, the syntax you're using is incorrect. You cannot drop a primary key in Oracle using the ALTER TABLE command directly.

Here's how you can do it:

  1. First, you need to find the name of the constraint. You can do this by running the following command:
SELECT constraint_name 
FROM user_constraints 
WHERE table_name = 'BORROWERS' AND constraint_type = 'P';
  1. Once you have the constraint name, you can drop the primary key using the following command:
ALTER TABLE BORROWERS DROP CONSTRAINT constraint_name;

Replace "constraint_name" with the actual name of the constraint you found in step 1.

This problem has been solved

Similar Questions

Error starting at line : 8 File @ /oracle.sqlIn command -alter table USERS drop primary key add primary key (Email)Error report -ORA-00933: SQL command not properly ended00933. 00000 - "SQL command not properly ended"*Cause: *Action:

Error starting at line : 9 File @ /oracle.sqlIn command -alter table USERS add key(Email)Error report -ORA-00902: invalid datatype00902. 00000 - "invalid datatype"*Cause: *Action:

Error starting at line : 9 File @ /oracle.sqlIn command -alter table RESERVATIONS modify ReservationTime TIME NULLError report -ORA-22858: invalid alteration of datatype22858. 00000 - "invalid alteration of datatype"*Cause: An attempt was made to modify the column type to object, REF, nested table, VARRAY or LOB type.*Action: Create a new column of the desired type and copy the current

Error starting at line : 6 File @ /oracle.sqlIn command -create table CROP(CROP_ID NUMBER primary key,CROP_NAME VARCHAR2(100) NOT NULL,PLANTING_DATE DATE NOT NULL,FIELD_ID NUMBER NOT NULL,constraint FK_FIELD_ID references FIELD(FIELD_ID),constraint FK_FIELD_CONDITION_FIELD_ID foreign key (FIELD_ID) references FIELD(FIELD_ID))Error report -ORA-00907: missing right parenthesis00907. 00000 - "missing right parenthesis"

Error starting at line : 7 File @ /oracle.sqlIn command -create table FIELD_CONDITION(CONDITION_ID NUMBER,FIELD_ID NUMBER NOT NULL,CONDITION_TYPE VARCHAR2(50) NOT NULL,VALUE NUMBER NOT NULL,RECORDED_AT TIMESTAMP NOT NULL,constraint FK_FIELD_CONDITION_FIELD_ID foreign key (FIELD_ID) references FIELD(FIELD_ID),constraint CK_CONDITION_TYPE check(CONDITION_TYPE in('soil moisture','temperature','humidity','pH'))Error report -ORA-00907: missing right parenthesis00907. 00000 - "missing right parenthesis"*Cause:

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.