Questions tagged [sql-drop]

`DROP` is a keyword in sql. It is used for dropping tables, triggers, schema, procedure etc.

DROP keyword is used for dropping tables, triggers, schema, procedure etc.

Sample code:

DROP TABLE tableName;

Reference

159 questions
0
votes
1 answer

sql DROP CONSTRAINT UNIQUE not working

I got the following table: CREATE TABLE `unsub_counts` ( `count_id` int(11) NOT NULL AUTO_INCREMENT, `unsub_date` date DEFAULT NULL, `unsub_count` int(11) DEFAULT NULL, `store_id` smallint(5) DEFAULT NULL, PRIMARY KEY (`count_id`), UNIQUE KEY…
axel wolf
  • 1,446
  • 3
  • 18
  • 29
0
votes
2 answers

Drop table in sql and add

I have some information that I am downloading via API into a SQL database. I am setting up cron to do this in the middle of the night. Sometimes new products are added or old ones are edited. I need to add new ones and update old ones if they exist.…
Tyler Nichol
  • 635
  • 2
  • 7
  • 28
0
votes
1 answer

MySQL DELETE statement with an user variable on a where-in clause?

Suppose I have this table: drop table if exists t_user; CREATE TABLE t_user (usr int, grp int); INSERT INTO t_user VALUES (123456, 5); INSERT INTO t_user VALUES (111111, 5); INSERT INTO t_user VALUES (111311, 5); INSERT INTO t_user VALUES (122111,…
0
votes
1 answer

Removing an application kills my Django admin interface

I had a login app which I was using. It had a table in my sqlite3 database. I decided I didn't need it anymore and I removed 'login', from my INSTALLED_APPS and I deleted the app directory. However, now whenever I go to /admin I get: ImportError at…
user623990
-1
votes
3 answers

Drop behavior in SQL DROP VIEW statement

Is the Statement: DROP VIEW a valid sql92 syntax? In some Databases (e.g Postgres, Redshift) there is the option to explicitly define a drop behavior DROP VIEW [RESTRICT|CASCADE] While for others it is an obligatory (e.g…
Daniel Heilper
  • 1,182
  • 2
  • 17
  • 34
-3
votes
2 answers

PHP - drop only one table from database

I've searched a long time and didn't found correct answer for this question that i want to delete only one table from database. so i have this:
ITSolution
  • 398
  • 2
  • 9
  • 21
-3
votes
2 answers

Sql Server Management studio drop table and re-create issue

I have created a table with primary key and foreign key using SQL Server Management studio 2008R2, then I have drop the table using the sql command drop table nameofthetable and the table has been dropped. After that I have created another table…
ezechiele2517
  • 375
  • 1
  • 5
  • 19
-4
votes
2 answers

What does DROP mean in SQL?

Was reading about 'DROP' in a SQL book I have. I am not entirely sure what it is supposed to do or means. Could anyone please give me a good description of the term?
Mitchell Walker
  • 211
  • 3
  • 8
  • 18
-4
votes
2 answers

How to drop the database in SQL Server using c#

Dear I am using SQL Server 2008. In my windows application there combo box having the list of all the databases. I want to delete the database that's selected in combobox. But when I run my query the following exception happens: Cannot drop…
1 2 3
10
11