Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2010
    Posts
    10

    Unanswered: Reducing table space

    Hi

    I have a requirement in which i have to make a table full so that no further records can be inserted into it.

    I can reduce the table space also.
    can someone tell me either how to reduce the tablespace or somehow fill the table completely (no manually) so that no further inserts are possible

    Thanks
    Abhishek

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    set the auto_increment of one of the rows to its maximum value
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2010
    Posts
    10
    alter table <tablename> auto_increment =222300

    is this correct

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    that should do it, except when i said "maximum" i meant the largest possible value for your auto_increment, not the largest value it currently has
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Apr 2010
    Posts
    10
    If i understood correctly this is the maximum number of rows that can be inserted right?

    Its is taking a lot of time
    more than 30 min and still not done.

  6. #6
    Join Date
    Jun 2007
    Posts
    197
    First Be clear what you have to do Reduce table space or limit max table

    What engine is table using ?

  7. #7
    Join Date
    Apr 2010
    Posts
    10
    I want a situation in which no new row can be inserted into the a table

Posting Permissions

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