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

DROP USER CASCADE in SQL Server 2005

I had created a USER, named Sandra and I granted her a SELECT privilege to a TABLE with GRANT OPTION. I had created another USER, named Jim. Sandra then granted her SELECT privilege to Jim. When I was trying to DROP USER Sandra, an error message…
Willy Lazuardi
  • 1,806
  • 4
  • 26
  • 41
0
votes
2 answers

How to drop and recreate the exact index

I have to change my column data type and it is indexed. Altering the column giving me error that I need to drop the index, disabling won't work. The question is how am I going to drop and recreate the exact index automatically? I can drop them but…
Pinchy
  • 1,506
  • 8
  • 28
  • 49
0
votes
1 answer

I dropped a table in Oracle, how can I retrieve it from the undo tablespace?

I accidentally dropped a fairly large table -- recycling bin is not enabled. I'm fairly certain the data still exists in the UNDO tablespace, but I'm not sure how to get it out. I recreated the table exactly as it was before it was dropped -- the…
user2836455
  • 1
  • 1
  • 1
0
votes
1 answer

pgSQL, dynamic drop tables statement

i want to dynamically delete some tables from database. I select them first, and then i am trying to use delete statement but it doesn't works. tmp TEXT; FOR tmp IN SELECT names from Garbage LOOP DROP TABLE tmp; END LOOP; but unfortuntly i got…
user2771738
  • 913
  • 11
  • 31
0
votes
1 answer

MySQL Drop table doesn't work for prefix

I am trying to drop tables with wp_ prefix but its giving error below Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE TABLE LIKE 'wp_%'' at line…
RDev
  • 35
  • 4
0
votes
1 answer

TRUNCATE some ids without delete other values MySQL

I want to TRUNCATE some values but I don't want to delete anothers... I have 3 ids, and the next id will be 14 or something like that... I want that the next id will be 4... How can I do this? I have one solution but I like other more simple. I can…
Seazoux
  • 621
  • 1
  • 5
  • 28
0
votes
1 answer

How to create a table then commit then insert then commit and drop table?

Hi I am having a problem committing to a database. I am very new to Firebird SQL. But I have a query that creates a table, then commits it, then inserts it, commits it, view the data, drop the table and then commit it again. I am trying to do…
0
votes
2 answers

Drop a non existing procedure in MySQL

I'm using MySQL 5.5.31 on fedora and I have trouble dropping a non existing procedure. With the root user: Create a new database: test Create a new user: test Give all permissions to user test for database test GRANT ALL PRIVILEGES ON test.* TO…
user2398796
  • 15
  • 1
  • 5
0
votes
1 answer

why do I require RESTRICT wildcard to drop schema in PostgreSQL

I have very little experience in PostgreSQL. I have been reading tutorials and documentation, and in order to create or drop a schema all of them say that I just need to execute: CREATE SCHEMA myschema; DROP SCHEMA myschema; but it doesn't work.…
jigzat
  • 3,498
  • 1
  • 21
  • 23
0
votes
1 answer

VB.net SQL Table Drop - table will not drop

I'm having trouble getting a SQL 2008 R2 Express table to drop using VB. Here is my code: Private Sub Form10_AssyWIP_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim sqConQC As New…
Fedaykin
  • 25
  • 1
  • 6
0
votes
1 answer

Truncate or Delete tables from the MySql database

I have a databse called store having 100 tables having too much foreign key references with tables, having thousands of records. Problem: Is it possible something like truncate to delete all the rows of all the tables in a single query. I tried but…
subodh
  • 6,136
  • 12
  • 51
  • 73
0
votes
1 answer

SQL Server: About improving diskspace

I've tried to find out the answer to this question, but i haven't found a clear and/or precise answer. In MS SQL (2008 in this case) does any of this commands: Delete, Truncate or Drop (table), "automatically" sets free the amount of disk space that…
0
votes
3 answers

Why To Sanitise POST and GET

I have a question......I get that you have to sanitise POST and GET to stop people doing nasty things to your website / DB , but I'm confused.....I saw the following on a website and thought I would ask the question. How would mr hacker know that…
Iain Simpson
  • 8,011
  • 13
  • 47
  • 66
0
votes
1 answer

Changing data type of column in SQL Server

I have to change datatype of a column in SQL Server. So what are the constraints in doing? I know I have to remove index and other constraints? Do I have to remove not null check ? What other things do I have to check before altering the…
Sam
  • 1,298
  • 6
  • 30
  • 65
0
votes
1 answer

how to change permission for the service account in azure's sql management portal

I want to delete an entry from my sql table, through Azure's sql management portal. When I query "DROP USER "XXX" " it says "Cannot drop the user 'XXX', because it does not exist or you do not have permission." Where can I change permission for the…
Nazerke
  • 2,098
  • 7
  • 37
  • 57
1 2 3
10
11