Wednesday, May 27, 2015

Table Already Exists SQL Server

Somehow I have created or you can say I have imported database into SQL and try to continue installation, but error "table already exists sql server" occur then installation has been interrupted. Meanwhile, another error "SQL=Duplicate entry 'add_user' for key 'PRIMARY':" also appear. In this case I had deleted those tables and modified dbsetup file.

CREATE TABLE logs (
        id bigint unsigned NOT NULL AUTO_INCREMENT,

to

CREATE TABLE logs (
        id bigint(20) unsigned NOT NULL AUTO_INCREMENT,

On sql I have used this command to delete tables

MariaDB [(none)]> use syslog
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [syslog]> drop table {YourTableName};

2 comments:

  1. This is nice post which I was awaiting for such an article and I have gained some very handy information from this site, I admire the valuable information you offer in all your articles.
    Wood router

    ReplyDelete
  2. I've produced or even you are able to state I've brought in data source in to SQL as well as attempt to carry on set up, however mistake "table currently is available sql server" happen after that set up may be disrupted.
    My blog

    ReplyDelete