Solved

Alter Table in AS400

Posted on 2004-04-23
5
5,279 Views
Last Modified: 2016-11-01
Hi.. I want to ask to You.
How syntac ALTER TABLE in DB2 (AS 400 Server / STRSQL)
My syntax is :

ALTER TABLE tristotr ADD COLUMN fieldtest DEC (18,2) NOT NULL WITH DEFAULT

that syntax is correct but IF I again INSERT FIELD IN TRISTOTR

   ALTER TABLE tristotr ADD COLUMN fieldtest2 DEC (18,2) NOT NULL
WITH DEFAULT

I get error  “SQL SYSTEM ERROR” , what's wrong ?



Regard
0
Comment
Question by:triary
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 33

Expert Comment

by:shalomc
ID: 10908272
How do you try to alter the table? From a green screen? from Operations Navigator?
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 10911663
have you tried commiting the frst alteration?
0
 

Author Comment

by:triary
ID: 10915261
To : Lowfatspread

Pls, give me sample syntax for alter table and commit .

because I get error 'Commit or Rollback not valid'
0
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 50 total points
ID: 10920721
ALTER TABLE tristotr
ADD COLUMN fieldtest DEC (18,2) NOT NULL WITH DEFAULT
;
COMMIT
;
   ALTER TABLE tristotr
 ADD COLUMN fieldtest2 DEC (18,2) NOT NULL
WITH DEFAULT
;
COMMIT
;
0
 

Expert Comment

by:Hafid Muhammad
ID: 41869471
Thanks for share
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question