Unix Technical Forum

Re: anything like MS-SQL "truncate" function in Informix?

This is a discussion on Re: anything like MS-SQL "truncate" function in Informix? within the Informix forums, part of the Database Server Software category; --> Could do the old fashioned following unit of work: BEGIN WORK; LOCK TABLE tablename; DELETE FROM tablename WHERE 1=1; ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 07:27 AM
Rob Vorbroker
 
Posts: n/a
Default Re: anything like MS-SQL "truncate" function in Informix?


Could do the old fashioned following unit of work:

BEGIN WORK;
LOCK TABLE tablename;
DELETE FROM tablename WHERE 1=1;
COMMIT WORK;

I'm admittedly OLD SCHOOL....and my 4GL is a bit
rusty...but I think you get the gist... You could
write a Stored Procedure for each of the specific
tables in question.

Rob Vorbroker
--- sumGirl <emebohw@netscape.net> wrote:

> Is there something in Informix thats analagous to
> the truncate
> function in MSSQL Server truncate?
>
> Looking for a way to very quickly get rid of every
> row in a table. We
> have been dropping and recreating on the fly, but
> that has our
> programmers hard coding dbspaces into there apps
> which is probably not
> best practice.
>



=====
Rob Vorbroker Phone: 513/336-8695
Vorbroker Consulting, Inc. Fax: 513/336-6812
www.vorbroker.com robv@vorbroker.com
sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com