Teradata Studio Alter Table statement error on TD DB.

Teradata Studio
Enthusiast

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).

Tags (1)
2 REPLIES
Teradata Employee

Re: Teradata Studio Alter Table statement error on TD DB.

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. 

Enthusiast

Re: Teradata Studio Alter Table statement error on TD DB.

Thank you Francine  :)