Search
 
SCRIPT & CODE EXAMPLE
 

SQL

duplicate entry

# USE AUTO_INCREMENT
AUTO_INCREMENT
Comment

duplicate entry

drop table And id column make auto increment the import data 
Comment

duplicate entry

The main reason why the error has been generated is because there is already an existing value of 1 for the column ID in which you define it as PRIMARY KEY (values are unique) in the table you are inserting.

Why not set the column ID as AUTO_INCREMENT?

CREATE  TABLE IF NOT EXISTS `PROGETTO`.`UFFICIO-INFORMAZIONI` (
  `ID` INT(11) NOT NULL AUTO_INCREMENT,
  `viale` VARCHAR(45) NULL ,
   .....
and when you are inserting record, you can now skip the column ID

INSERT INTO `PROGETTO`.`UFFICIO-INFORMAZIONI` (`viale`, `num_civico`, ...) 
VALUES ('Viale Cogel ', '120', ...)
Comment

PREVIOUS NEXT
Code Example
Sql :: delete ids between sql 
Sql :: how to combine diff colmun value using group by postgres 
Sql :: what is default mysql database password in linux 
Sql :: What is dialect for Postgres 
Sql :: sql server convert date to weekday 
Sql :: postgres extract day from date 
Sql :: DATEDIFF minute postgres 
Sql :: create or replace function 
Sql :: how to connect postgresql database with java 
Sql :: mysql if null 
Sql :: mysql money value 
Sql :: json query 
Sql :: rename table column name in mysql 
Sql :: mysql backup database command line 
Sql :: difference between join vs union 
Sql :: spring boot working with sql database connection 
Sql :: change user mysql password 
Sql :: postgress connection refused 
Sql :: enter mysql command line 
Sql :: mysql order by two columns priority 
Sql :: flask marshmallow sqlalchemy 
Sql :: mysql datetime with timezone offset 
Sql :: mysql drop key 
Sql :: q operator in oracle 
Sql :: how to delete a table in mysql 
Sql :: sql get duplicates by composite 
Sql :: mysql max 
Sql :: into sql 
Sql :: SQL COUNT() with WHERE 
Sql :: sql Split string function 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =