I created the table Test_Project2 in Oracle SQL Developer. After that I realized that the column proj_name is of a small size, so I decided to modify the column using the follwoing statement
ALTER TABLE TEST_PROJECT2 MODIFY proj_name VARCHAR2(300);
but for some reason Oracle SQL Developer underscores the semi-colon with red and I do not what is mistake and how to correct it
Test_Project2:
CREATE TABLE Test_Project2 ( proj_id number(30), proj_name VARCHAR2 (30), proj_desc VARCHAR2(300) );
In generic terms, you use the ALTER TABLE command followed by the table name, then the MODIFY command followed by the column name and new type and size. Here is an example: ALTER TABLE tablename MODIFY columnname VARCHAR(20) ; The maximum width of the column is determined by the number in parentheses.
Automatically resize all columns and rows to fit the data 1 Select the Select All button at the top of the worksheet, to select all columns and rows. 2 Double-click a boundary. All columns or rows resize to fit the data. More ...
ALTER TABLE address MODIFY state VARCHAR (20) ; In generic terms, you use the ALTER TABLE command followed by the table name, then the MODIFY command followed by the column name and new type and size. Here is an example: ALTER TABLE tablename MODIFY columnname VARCHAR (20) ;
Select the “Line Between” option to have Word put a vertical line between columns. And now, on to actually adjusting the column width. If you want your columns to all stay the same width as one another, you can just adjust the number in the “Width” box for column #1. Changes you make there apply to all columns, no matter how many you have.
Regardless of what error Oracle SQL Developer may indicate in the syntax highlighting, actually running your alter
statement exactly the way you originally had it works perfectly:
ALTER TABLE TEST_PROJECT2 MODIFY proj_name VARCHAR2(300);
You only need to add parenthesis if you need to alter more than one column at once, such as:
ALTER TABLE TEST_PROJECT2 MODIFY (proj_name VARCHAR2(400), proj_desc VARCHAR2(400));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With