Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2008

Tip: Looking for answers? Try searching our database.

Derby

Thread view: 
Chase Preuninger - 06 Mar 2008 11:47 GMT
I have a copy of derby distributed with netbeans, and I added a column
to my table, but now I can't drop it.

ALTER TABLE Pages DROP COLUMN Links

Exception in thread "main" java.sql.SQLSyntaxErrorException: Syntax
error: Encountered "DROP" at line 1, column 19.
       at
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(Unknown
Source)
       at
org.apache.derby.client.am.SqlException.getSQLException(Unknown
Source)
       at org.apache.derby.client.am.Statement.execute(Unknown
Source)
       at linkcounter.Main.main(Main.java:14)
Caused by: org.apache.derby.client.am.SqlException: Syntax error:
Encountered "DROP" at line 1, column 19.
       at org.apache.derby.client.am.Statement.completeSqlca(Unknown
Source)
       at
org.apache.derby.client.am.Statement.completeExecuteImmediate(Unknown
Source)
       at
org.apache.derby.client.net.NetStatementReply.parseEXCSQLIMMreply(Unknown
Source)
       at
org.apache.derby.client.net.NetStatementReply.readExecuteImmediate(Unknown
Source)
       at
org.apache.derby.client.net.StatementReply.readExecuteImmediate(Unknown
Source)
       at
org.apache.derby.client.net.NetStatement.readExecuteImmediate_(Unknown
Source)
       at
org.apache.derby.client.am.Statement.readExecuteImmediate(Unknown
Source)
       at org.apache.derby.client.am.Statement.flowExecute(Unknown
Source)
       at org.apache.derby.client.am.Statement.executeX(Unknown
Source)
       ... 2 more
Java Result: 1
Alex.From.Ohio.Java@gmail.com - 13 Mar 2008 16:47 GMT
Your exception says clearly: Syntax
error: Encountered "DROP" at line 1, column 19.

You can't drop column.
See syntax here:
http://db.apache.org/derby/docs/10.1/ref/

Alex.
http://www.myjavaserver.com/~alexfromohio/
Lew - 14 Mar 2008 01:10 GMT
> Your exception says clearly: Syntax
> error: Encountered "DROP" at line 1, column 19.
>
> You can't drop column.
> See syntax here:
> http://db.apache.org/derby/docs/10.1/ref/

My, that is a significant variance from the SQL standard.

I found a more complete comparison of Derby syntax with SQL 92 at
<http://publib.boulder.ibm.com/infocenter/cscv/v10r1/index.jsp?topic=/com.ibm.clo
udscape.doc/rrefsql9241891.html
>

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.