Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Insert/Update/Delete Or Drop Table/Create Table/Insert Or Drop Table/Select Into

Posted on 2008-10-14
5
Medium Priority
?
237 Views
Last Modified: 2012-05-05
Is it better to Insert/Update/Delete Or Drop Table/Create Table/Insert Or Drop Table/Select Into?
0
Comment
Question by:pat_cunningham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 1600 total points
ID: 22715078
That depends on what you're doing.

I usually avoid dropping tables ... but that's largely preference.  If you absolutely don't need the data back that you're deleting, you can TRUNCATE TABLE to be more efficient than doing a DELETE.
0
 
LVL 39

Expert Comment

by:BrandonGalderisi
ID: 22715084
The only answer is:

Yes, unless it's no.

There is no way to answer that question without knowing more.

How big of a table?
Indexes?
How often?

These are just SOME of the answers.
0
 
LVL 60

Expert Comment

by:chapmandew
ID: 22715098
My question is....what are you trying to do?
0
 

Author Comment

by:pat_cunningham
ID: 22715127
It is a large query that I run several times a day and dump into a table.  The table on has 225 rows and 50 columns but the query takes a while and the data is used on a webpage so I put it into a table to speed things up.
0
 
LVL 60

Assisted Solution

by:chapmandew
chapmandew earned 400 total points
ID: 22715431
have you tried to truncate the table first and then load it...truncating a table takes far less time than deleting...but since it is only 225 records, either way would be pretty speedy.

dont' delete, as you lose any permissions on the table.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question