So what does one do after say, creating a table?
Insert data into that table of course.
How are we going to do this?
The conventional way is to go with a:
Insert data into that table of course.
How are we going to do this?
The conventional way is to go with a:
- INSERT INTO table_name VALUES ( value1, value2, ..., valueN);
- Else, you can use say a "short cut" of sorts by using '&', like below:
- INSERT INTO table_name VALUES ( &column1, &column2, ..., &columnN);
Basically each time you run the above statement you will be get a prompt to enter the column values, which makes data entry a bit easy.
Note: An error that I faced while using this was:
ORA-00984: column not allowed here
You may come across this, so please find the solution below:
If you are trying to enter a character value, say for example the column column2 is VARCHAR2(20) as per the table structure.
Then you will have to explicitly enclose the data in single quotes, say 'data for value2 column' is the right way to entering data into column2.
Happy Programming!
Brendon
No comments:
Post a Comment