Professional Documents
Culture Documents
we can update our table as per our wish using some sql queries..
if you have already a table and you want to add a new column into your that table
then you can update your table through queries
:: alter table employee Add name (i.e. column_name) varchar2(20) (i.e. data_type
with Max length);
if you want to check the columns and it's information of perticular table then
write a query
:: desc table_name;
if you want to change the size of any existing column then you use the query like
below
here 'modify' keyword is used for modify the size of existing column
this is the altering task so we must have to specify the 'alter table table_name'
syntax first
if you want to add more than 1 columns in your existing table then you have first
write the
updatation syntax and then use the 'add' keyword and write the new columns in the
paranthesis
using commas,
here the 'drop' and 'column' both are the keywords where the 'drop' is used to
delete and 'column'
is used after 'drop' to specify the operation of dropping column and after all we
have to specify
the column name