, Drop column Error ora-00933 sql command not properly ended - oracle12c

I need to drop an column in my existing table. Not sure why below syntax is not working for me and getting 'ora-00933 sql command not properly ended'
DB Query:
ALTER TABLE employee DROP COLUMN TITLE;
Please suggest. Using oracle 12c version.

Thanks #learningloop for suggestions.
I tried after removing the semi-colon in the SQL and it worked out. I was using toad editor for the query execution.

Related

How to properly use plain SQL code in Postgresql?

I'm using pgadmin right now and this is the table I created. I'm trying to convert this wkb_geometry column into lat,lon geometry point.
When I tried to select this column and declare it as a variable so I can perform some conversion on it, I failed to do so by using plain SQL code such as "DECLARE #xxx VarChar". I looked it up and did see that plain SQL code doesn't always work in Postgres but haven't found a solution yet. Could someone point me a way to do it? Thank you so much!!

how to use parameterized Query in after sql in datastage?

I have to create a table in DB2 and read the query from file in Before/After Sql tab in Datastage.
I am using DB2 connector for this.
I have also parameterized the query but getting below error-
an unexpected token was found '/'.
create table Temp as(#Query#) with data
can u help in suggesting how can i achieve this successfully. Thanks in advance
Try loading the entire query into the parameter, rather than just the table name.

COPY FROM csv file into Postgresql table and skip id first row

simple question I think but I can't seem to find the answer through Googling etc.
I am importing csv data into a postgresql table via psql. I can do this fine through the pgAdmin III GUI but am now using Codio Online IDE where it is all done through psql.
How can I import into the Postgresql table and skip the first 'id' auto incrementing column?
In pgAdmin it was as simple as unselecting the id column on the 'columns to import' tab.
So far I have in the SQL Query toolbox
COPY products FROM '/media/username/rails_projects/app/db/import/bdname_products.csv' DELIMITER ',' CSV;
Alternatively, is it possible to get an output on the SQL that PgAdmin III used after you execute an Import using the menu Import command?
Thank you for your consideration.
As explained in the manual, copy allows you to specify a field list to read, like this:
COPY table_name ( column_name , ... ) FROM 'filename'

Mysterious disappearance of an Index in an Oracle 10g table

I have a table in an Oracle database. An Index has mysteriously disappeared. Is there any way to find out how that happened? I am using Toad for Oracle Version 9.5.0.31
Thanks
I'm not sure you can find out after the fact but you can log future DROPs"
CREATE or replace TRIGGER your_name AFTER DROP
ON your_schema
pl/sql_block
You'll also have to create a logging table and insert into it.

Not able to query after Alter table in DB2

We have a table someone created in DB2. I have no idea how they created it. But when I edit the table, It edits just fine. But after edit I can not query the table at all THE COLUMN CANNOT BE ADDED TO THE TABLE BECAUSE THE TABLE HAS AN EDIT PROCEDURE.
I looked ibm site and found this how to edit table using procedure
But I have no idea how to do this.
Is there anything that I can do to fix this with out following the procedure mentioned in second link?
I restarted server, but still no help. First I'm not able to figure out why I get the error in first place.
I'm using DB Visualizer and DB2 on linux.
This is sometimes default behavior of DB2. We need to run reorgchk command to fix these errors. More info below..
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0000888.htm
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/c0023297.htm