1

I am running a mysql database on an RDS instance.

My table schema is:

Table: users, Columns:

_id - int(11) AI PK
username - varchar(50) UNIQUE
email - varchar(100) UNIQUE

Im then using the following SQL statement to attempt to enter a new record

INSERT INTO usrdb.users (username, email)
VALUES ("admin", "admin@test.com")

This statement just times out (30 seconds) repeatedly.

I know from experience that a simple insert statement shouldn't take anywhere near this length of time.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
mwild
  • 1,483
  • 7
  • 21
  • 41
  • `INSERT INTO usrdb.users (username, email) VALUES ('admin', 'admin@test.com')` – Lukasz Szozda Aug 09 '17 at 11:00
  • 1
    Unbelievable. I could have sworn I was doing this before and switched just to check. Thanks – mwild Aug 09 '17 at 11:05
  • Possible duplicate of [When to use single quotes, double quotes, and backticks in MySQL](https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql) – Lukasz Szozda Aug 09 '17 at 11:06

2 Answers2

2

Gotta change the double quotes to single quotes :) https://www.tutorialspoint.com/sql/sql-insert-query.htm

Dominic Mazur
  • 46
  • 1
  • 7
0

This query example should work :

 INSERT INTO `table`(`col1`, `col2`) VALUES ('varchar','varchar')

Check if there is a duplicate Exception raised.

Khaled Ouertani
  • 316
  • 2
  • 13