Results 1 to 1 of 1
- 11-27-2010, 03:47 PM #1Member
- Join Date
- Nov 2009
- Rep Power
Databse noob - Java SQL questions
we have a database in our Java program which holds information about registered users, etc. and I am a complete database noob.
Now in sql there is this ALTER TABLE ... ADD COLUMN syntax, which lets you add a column to an existing table.
Now I want to know how I can skip this if the table already has the column?
So the syntax for "if table x has column y, don't add it". It needs to be conform with the executeUpdate(String sql) method from the interface Statement.
- By Olgar in forum New To JavaReplies: 8Last Post: 06-30-2010, 02:30 AM
- By pra.deep in forum AWT / SwingReplies: 6Last Post: 09-17-2009, 10:50 AM
- By critdevil in forum New To JavaReplies: 12Last Post: 03-07-2009, 04:17 AM
- By furry in forum IntroductionsReplies: 0Last Post: 10-07-2008, 07:39 PM
- By Snejana in forum New To JavaReplies: 4Last Post: 01-24-2008, 04:52 AM