473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

function truncate

hi, everybody !

how to different between drop table and truncate table ?

thank you.
May 21 '07 #1
5 4283
frozenmist
179 Expert 100+
Hi,
What a drop table is does is, it functions as a table delete i.e; it ceases to exist in the data base.
Whereas the truncate deletes all rows from the table.
Is this enough?

Cheers
May 21 '07 #2
rsrinivasan
221 100+
hi, everybody !

how to different between drop table and truncate table ?

thank you.
Hi,
I think you the difference between delete tables and truncate table. Right?

1. Both will be used to delete rows from the table.
2. TRUNCATE will delete all the rows from the table. Because we cant
use "WHERE" clause in truncate statement.
3. We can rollback the records which are deleted by "DELETE" commands.
But We cant rollback the deleted records, if you deleted by
using "TRUNCATE" commands.
4. DELETE is DDL statement. But TRINCATE is DML statement

Thanks,
Srinivas r.
May 21 '07 #3
rsrinivasan
221 100+
hi, everybody !

how to different between drop table and truncate table ?

thank you.
Hi,
I think you want the difference between DELETE tables and TRUNCATE table. Right?

1. Both will be used to delete rows from the table.
2. TRUNCATE will delete all the rows from the table. Because we cant
use "WHERE" clause in truncate statement.
3. We can rollback the records which are deleted by "DELETE" commands.
But We cant rollback the deleted records, if you deleted by
using "TRUNCATE" commands.
4. DELETE is DDL statement. But TRINCATE is DML statement

Thanks,
Srinivas r.
May 21 '07 #4
Hi,
I think you want the difference between DELETE tables and TRUNCATE table. Right?

1. Both will be used to delete rows from the table.
2. TRUNCATE will delete all the rows from the table. Because we cant
use "WHERE" clause in truncate statement.
3. We can rollback the records which are deleted by "DELETE" commands.
But We cant rollback the deleted records, if you deleted by
using "TRUNCATE" commands.
4. DELETE is DDL statement. But TRINCATE is DML statement

Thanks,
Srinivas r.

can anyone tell me how to recall the deleted data ?
May 22 '07 #5
rsrinivasan
221 100+
can anyone tell me how to recall the deleted data ?
Hi,
Just use "ROLLBACK" command.

Thanks,
Srinivas r.
May 23 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: martin | last post by:
Hi, We have a heavily used production server and a table which logs every hit on a web site. This table has grown large over time and we want to clear it down as efficiently as possible. We would...
3
by: LineVoltageHalogen | last post by:
Greeting All, I have a stored proc that dynamically truncates all the tables in my databases. I use a cursor and some dynamic sql for this: ...... create cursor Loop through sysobjects and...
1
by: New MSSQL DBA | last post by:
I have recently been assigned to take over several MSSQL environments and found some of the existing practice confusing. As most of my previous experiences are on Oracle and Unix platform so would...
2
by: rdraider | last post by:
Hi, I am trying to create a script that deletes transaction tables and leaves master data like customer, vendors, inventory items, etc. How can I use TRUNCATE TABLE with an Exists? My problem is...
9
by: Sumanth | last post by:
Are there any implementations of truncate in db2. Is it going to be implemented in the future? Is there an alternate way of doing a truncate of a table that has a high record count without using...
14
by: Sala | last post by:
Hi I want to truncate all data in database ... pls help me how i ll truncate?
10
by: Troels Arvin | last post by:
Hello, Until this date, I believed that DB2 has no TRUNCATE TABLE command. But then I came across...
3
by: Kurt | last post by:
Hi, I'd like advices about an idea I add to resolve a problem. thanks to you in advance for yours answers. I have a database with tables that I load with flat file. The size of each table is...
5
by: Timothy Madden | last post by:
Hello I see there is now why to truncate a file (in C or C++) and that I have to use platform-specific functions for truncating files. Anyone knows why ? I mean C/C++ evolved over many years...
8
by: ananthaisin | last post by:
How to reduce the table size for any table while using truncate or delete statements. In oracle 8i it was truncating the storage space but in 10g it is not .... I have given truncate statement in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.