Problem wth sql statment.

Caporegime
Joined
12 Mar 2004
Posts
29,962
Location
England
I'm using the oracle application express to experiment with databases, and entering commands into the sql command processor.

But this code doesn't work.

alter table televisions
modify (resolution varchar2(9) 1366x768)

Can someone tell me what I've done wrong here?
 
Last edited:
Trying to change the resolutions column to varchar2 and set the default value to 1366x768.

From the oracle website.

"To modify a column, use the SQL syntax shown. Modifying a column can include changes to a column's data type, size, and DEFAULT value."

ALTER TABLE tablename
MODIFY (column name datatype [DEFAULT expression],
column name datatype, ...
 
Of course, I forgot to put quotes around the 1366x768. :o

The database isn't anything serious, it's just so I can experiment with the different sql commands.
 
Back
Top Bottom