All Forums Teradata Studio
cr255014 23 posts Joined 01/14
12 Jul 2015
Teradata Studio Alter Table statement error on TD DB.

When I run a query

ALTER TABLE tablename DROP COLUMN columnname;

from my SQL Assistant, It runs file, but when I run the same in Studio it fails to run.

ALTER TABLE tablename DROP  columnname;

runs fine in STUDIO.


What I have found is there is some SQL difference between ODBC and JDBC, .NET Data Provider.

First query only runs in ODBC connection where as it fails with JDBC and .NET Data Provider.


Is there any specific reason why this runs in ODBC? (It looks like standard SQL syntax to DROP a column in Teradata is Query 2).

fgrimmer 553 posts Joined 04/09
13 Jul 2015

Chiran, ODBC is doing special handling for the query that .NET and JDBC do not. The Teradata documentation (SQL Data Definition Language Syntax and Examples) shows the syntax for ALTER TABLE with DROP followed by a name. The first example also fails when parsing the SQL in the SQL Editor. 

cr255014 23 posts Joined 01/14
14 Jul 2015

Thank you Francine  :)

You must sign in to leave a comment.