Questions tagged [drop-table]

The SQL command for deleting an entire table.

DROP TABLE is used in SQL to remove a table.

152 questions
1
vote
2 answers

How to drop user without table in oracle

How can I drop user without the table in oracle? create user andi identified by andi; alter user andi quota 10m on users; grant connect to andi; grant create table to andi; conn andi; create table mahasiswa( idmhs number(3) primary key,…
1
vote
2 answers

dropping temporary table

I have 3 php scripts: in 1st one I create a temporary table (in MySQL) with name based on User ID, in 2nd I use that table and give a message to the user, in the 3rd one I use and delete temporary table and give message to the user. My problem is…
Victoria B
  • 79
  • 7
0
votes
1 answer

My script can't execute Drop table command SQL Server 2008

I have a script which has a DROP TABLE command like this: IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('msdb.dbo.lobloblob') AND type in (N'U')) DROP TABLE msdb.dbo.lobloblob CREATE TABLE msdb.dbo.lobloblob .... this command…
Mohammad Sheykholeslam
  • 1,379
  • 5
  • 18
  • 35
0
votes
0 answers

Cannot Drop the unmannaged Delta lake table through pyspark code

I am trying to drop a unmanaged table but it only drops its metadata. I am using the following Code in Databricks spark.sql("DROP TABLE IF EXISTS…
Umer
  • 25
  • 5
0
votes
0 answers

Alembic - Remove legacy table

I am junior dev, I am new at a project. I have to delete a legacy table. I found it in a migration (created with Alembic): import sqlalchemy as sa from alembic import op def upgrade(): op.create_table( 'customer_data', #…
RubyLearning
  • 83
  • 1
  • 7
0
votes
2 answers

Oracle drop table if exists is throwing an error starting at line 1: in command

We are trying to drop all tables in a database and then create them again, but oracle is throwing an error. the error report is: Error report - ORA-06550: line 12, column 1: PLS-00103: Encountered the symbol "CREATE" 06550. 00000 - "line %s,…
0
votes
1 answer

MySQL drop a Table Named "trigger"

I just created a MySQL Table called "trigger". The Problem now: I want to "drop table trigger;" This is not working. (Syntax error...) because it recognizes trigger not as name but as a trigger. How do I do drop a table Named "trigger"?
Pätsn
  • 66
  • 3
0
votes
1 answer

How to export Favorite list of tables in phpmyadmin and import back when needed?

Problem: Installing wordpress plugins to test their effectiveness, sometimes creates additional tables on database. After testing some plugins, it becomes difficult to quickly identify and delete not needed tables created by them. What I want: I…
0
votes
1 answer

How to DROP a table from a specific SCHEMA in POSTGRES?

I am using Heroku, and Postgres database. I somehow have same table but in two different schemas, first one in public, second one in a custom schema I called mySchema. I need to drop the table which is in Public schema. Should I put the schema name…
Sushi
  • 646
  • 1
  • 13
  • 31
0
votes
1 answer

In Oracle 19c database, when we drop a table what happens to the procedures, triggers, index that uses this table?

In Oracle 19c database, when we drop a table what happens to the procedures, triggers, index that uses this table? Will the triggers, procedures, index gets dropped automatically or will it become INVALID status? I want to know what is the correct…
Varsha
  • 11
  • 1
  • 5
0
votes
1 answer

Why does Django recreate the DB tables on each docker-container restart?

I am running Django with PostgreSQL in a docker-compose setup for development. Each time I restart the application container, the database is empty, even though I do neither restart the DBMS container nor do I drop the DBMS's data volume. It seems…
0
votes
0 answers

PostgreSQL equivalent for RESTRICT ON DROP

Is there an equivalent function or workaround to realize DB2´s RESTRICT ON DROP attribute in PostgreSQL 9.5 or later?
StanWell
  • 35
  • 4
0
votes
2 answers

by mistake i have dropped a table in oracle sql developer, how can I get the table back

i am working on oracle sqldeveloper, i am supposed to drop the table emp12. But i have dropped the table emp1 by mistake. Is there a way, so that i can get the table emp1 again. drop table emp1; can we get back dropped table using flasback query.
Mahesh
  • 48
  • 5
0
votes
0 answers

PHP Sqlite Drop Table not executing

The following code searches for any table not declared in the array $__keys and DROPs the table only if the row count is 0. It is however, not dropping the table. I have added a number of checks using a string called $return that collects the table…
Walrus
  • 19,801
  • 35
  • 121
  • 199
0
votes
1 answer

Does RoomDB supports dropAllTables() and createAllTables()?

GreenDAO supports DaoMaster.dropAllTables() and DaoMaster.createAllTables(). I'm looking for similar functionality in RoomDB. Does RoomDB supports this functionality ?? The use-case for this functionality is, when the user tries to login with new…