sql-drop Questions

7

Solved

I am attempting to clean out a table but not get rid of the actual structure of the table. I have an id column that is auto-incrementing; I don't need to keep the ID number, but I do need it to kee...
Conspire asked 8/4, 2010 at 16:16

5

I have a client application that creates a temp table, the performs a bulk insert into the temp table, then executes some SQL using the table before deleting it. Pseudo-code: open connection begi...
Cnidoblast asked 15/4, 2010 at 1:13

5

Solved

I want to drop my tables in my database. But, when I use, for example, DROP TABLE if exists users; I receive this message: cannot drop table users because other objects depend on it I found the s...
Perfectionist asked 11/2, 2016 at 11:56

10

Solved

How can I drop all user tables in oracle? I have problem with constraints. When I disable all it is still no possible.
Mcardle asked 6/11, 2009 at 20:59

2

Solved

On my mysql DB with inno_db engine, I have a table with a foreign key. I want to drop the column (along with the foreign key and the associated index of course - i don't need the whole column!) ...
Mimir asked 8/4, 2011 at 1:6

7

Solved

In oracle, to drop all tables and constraints you would type something like DROP TABLE myTable CASCADE CONSTRAINTS PURGE; and this would completely delete the tables and their dependencies. What...
Joe asked 1/2, 2011 at 3:11

27

Solved

Is there a nice easy way to drop all tables from a MySQL database, ignoring any foreign key constraints that may be in there?
Adjunct asked 13/8, 2010 at 12:28

7

I have a list of half a dozen MSSQL 2008 tables that I would like to remove at once from my database. The data has been entirely migrated to new tables. There is no reference in the new tables to t...
Misapply asked 12/11, 2009 at 8:33

3

Solved

I want to perform a simple DROP VIEW ... but it hangs. I have run this query SELECT * FROM pg_locks WHERE NOT granted taken from this page on Lock Monitoring. However the following query they sug...
Simmers asked 4/12, 2013 at 11:0

16

Solved

I'm writing some migration scripts for an Oracle database, and was hoping Oracle had something similar to MySQL's IF EXISTS construct. Specifically, whenever I want to drop a table in MySQL, I do ...
Shavian asked 25/11, 2009 at 18:46

5

Solved

On our original design we screwed up a foreign key constraint in our table. Now that the table is full of data we cannot change it without dropping all of the records in the table. The only solutio...
Consume asked 17/5, 2011 at 15:26

5

Solved

I have created a user in mysql. Now i want to delete the user ? How to do that? I am getting this error : ERROR 1396 (HY000): Operation DROP USER failed for 'user'@'localhost' I am using this co...
Kearns asked 20/12, 2013 at 7:21

6

Solved

DROP TABLE ( SELECT table_name FROM information_schema.`TABLES` WHERE table_schema = 'myDatabase' AND table_name LIKE BINARY 'del%'); I know this doesn't work! What is the equivalent for somethin...
Prickett asked 15/6, 2012 at 14:54

6

Solved

I need to drop a DB2 table if it exists, or drop and ignore errors.
Roark asked 25/11, 2011 at 15:5

6

Solved

I'm trying to delete all tables from a database except one, and I end up having the following error: Cannot delete or update a parent row: a foreign key constraint fails Of course I could tri...
Furcula asked 19/2, 2010 at 23:49

6

Solved

Simple question, as the title suggests: What is the syntax to drop a Stored Procedure (SP) in SQL Server 2000, by first checking that the SP exists? Please provide the full code.
Crisis asked 2/8, 2010 at 10:48

3

Solved

Just to clarify, ths isn't really a question, more some help for people like me who were looking for an answer. A lot of applications create temp tables and the like, but I was surprised when Team ...
Bennington asked 25/2, 2011 at 10:49

4

Solved

After dropping the table, found that the index created on the columns of the dropped table is gone. I just want to know what happens after that. Could someone please explain? What all are the othe...
Eden asked 8/12, 2011 at 15:3

6

Solved

Is it possible to drop all NOT NULL constraints from a table in one go? I have a big table with a lot of NOT NULL constraints and I'm searching for a solution that is faster than dropping them sep...
Sibell asked 22/11, 2013 at 13:49

2

I am trying to drop a role 'xyz' that was previously the owner of the schema with the same name 'xyz'. I altered the schema ownership as below, and run reassigned ownership just in case (although a...
Frisco asked 23/3, 2012 at 14:27

3

How do I drop and recreate a table with updated information? For example; I have a table in my application with 5 records. ID Entry 1 a 2 b 3 c 4 d 5 e Now when I delete a record lets say, ID...
Affable asked 22/1, 2013 at 8:40

10

Solved

Create Table: CREATE TABLE `fuinfo` ( `fid` int(10) unsigned NOT NULL, `name` varchar(40) NOT NULL, `email` varchar(128) NOT NULL, UNIQUE KEY `email` (`email`), UNIQUE KEY `fid` (`fid`) ) ENGI...
Sarette asked 14/10, 2009 at 8:7

10

Solved

How to delete my tables who all have the prefix myprefix_? Note: need to execute it in phpMyAdmin
Rojas asked 19/10, 2009 at 15:14

5

Solved

The error message I'm obtaining when trying to drop a column: The object 'defEmptyString' is dependent on column 'fkKeywordRolleKontakt'. Msg 5074, Level 16, State 1, Line 43 ALTER TABLE DROP COLU...
Acclamation asked 12/2, 2010 at 16:12

1

This is the query I'm trying to execute: DROP INDEX id_index on table; I've been able to drop indexes quickly in the past, but this query ran for almost an hour before I gave up on it. What could...
Graben asked 4/2, 2015 at 18:52

© 2022 - 2025 — McMap. All rights reserved.