This is my table structure:
Desc t_student;
Name Type Nullable Default Comments
------------ ------------ -------- ------- --------
stu_id VARCHAR2 (10)
Stu_name VARCHAR2 (40)
Stu_password VARCHAR2 (+) Y
Stu_age INTEGER Y
Stu_perform FLOAT (2) Y
Inserts a single piece of data into this table in PL/SQL
Insert into T_student (stu_id, Stu_name, Stu_password, Stu_age, Stu_perform) VALUES (' 001 ', ' David ', ' David ', 12, 89.00);
Insert failed, ORA-00904: "Stu_perform": Invalid identifier
Why, Why? Change to uppercase also not, will stu_perform remove will prompt stu_age identifier invalid.
To solve the problem, you prawns ~
As you see in the PL/SQL DESC command, your field is named lowercase and the result of the field double quotation marks when the table is built
CREATE TABLE T_studetn ("stu_id", "Stu_name",.........
In this case, double quotation marks are also added to the field when inserting the data, and the case should correspond, so that:
INSERT INTO T_student ("stu_id", "Stu_name", "Stu_password", "Stu_age", "Stu_perform") VALUES (' 001 ', ' David ', ' David ', 12 , 89.00);
So do not add double quotes when building tables and using identifiers to avoid trouble.
As
you see in the PL/SQL DESC command, your field is named lowercase, and the result of the field with double quotation marks when the table is built create TABLE T_STUDETN ("stu_id", "Stu_name",......... In this case, the fields are also enclosed in double quotation marks when inserting the data, and the case should correspond, so that: INSERT INTO t_student ("stu_id", "Stu_name", "Stu_password", "Stu_ag ...
The upstairs is really bad. I also desc my own table, the field is really uppercase. The landlord's lowercase, it is estimated that the matter. You have to watch these little things carefully.
As
you see in the PL/SQL DESC command, your field is named lowercase, and the result of the field with double quotation marks when the table is built create TABLE T_STUDETN ("stu_id", "Stu_name",......... In this case, the fields are also enclosed in double quotation marks when inserting the data, and the case should correspond, so that: INSERT INTO t_student ("stu_id", "Stu_name", "Stu_password", "Stu_age ...
I'm relying on the modeling tools. Thank you so much.
Oracle Insert Data issues