Results 1 to 6 of 6

Thread: truncate table

  1. #1
    Join Date
    Oct 2002
    Posts
    8

    Unanswered: truncate table

    i use ids 2000 form linux. And i found some sqls are not supported on it, such as "truncate table". Who can tell me why?

    Thanks!

  2. #2
    Join Date
    Mar 2002
    Posts
    112

    re

    I don't know that
    but the same operation you can drop-create table
    it's faster enough for used

  3. #3
    Join Date
    Oct 2002
    Posts
    8

    Re: re

    Originally posted by dananio
    I don't know that
    but the same operation you can drop-create table
    it's faster enough for used
    Thanks for ur reply.
    But it would be error if the sql were broken up while deleting tables last time...

  4. #4
    Join Date
    Mar 2002
    Posts
    112

    re

    I don't understand ???
    all of sql statements will error if sql is broken

  5. #5
    Join Date
    Oct 2002
    Posts
    8
    I have a sql runs every day to import some data to some tables. Now i use drop and create table instead of "truncate table", and i put this sql script to crontab. If last day some errors occured while deleting some tables, perhaps there are tables still exist in the database. This circumstance course errors and break down while the script automatic start up again unless manually correct it which will not happen use "truncate table"

  6. #6
    Join Date
    Mar 2002
    Posts
    112

    re

    before you load data into table you have to check row of table if it 0 then you can load but if it isn't 0 then you call drop-create again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •