In an insert statement you wouldn’t have an existing row to do a where claues on? You are inserting a new row, did you mean to do an update statment?
update users set username="JACK" and password='123' WHERE id='1';
More Related Contents:
- SELECTING with multiple WHERE conditions on same column
- MySQL Conditional Insert
- Get the new record primary key ID from MySQL insert query?
- Which is faster: multiple single INSERTs or one multiple-row INSERT?
- Detect if value is number in MySQL
- SQL – IF EXISTS UPDATE ELSE INSERT INTO
- MySql Table Insert if not exist otherwise update
- Increment a database field by 1
- Prevent auto increment on MySQL duplicate insert
- MySQL trigger On Insert/Update events
- How do I get the ID of multiple inserted rows in MySQL?
- MySQL trigger to update a field to the value of id
- How to insert data to MySQL with auto-incremented column(field)?
- MySQL Select last 7 days
- Field ‘id’ doesn’t have a default value?
- MySQL INSERT INTO … VALUES and SELECT
- insert data from one table to another in mysql
- Reserved word in column name – insert into MySQL [duplicate]
- MySQL – ORDER BY values within IN()
- What are practical differences between `REPLACE` and `INSERT … ON DUPLICATE KEY UPDATE` in MySQL?
- MySQL LAST_INSERT_ID() used with multiple records INSERT statement
- Mysql insert into 2 tables
- MySQL – insert data from another table merged with constants
- Insert data into table with result from another select query
- MySQL: Insert datetime into other datetime field
- MySQL – How to parse a string value to DATETIME format inside an INSERT statement?
- Incorrect integer value: ” for column ‘id’ at row 1
- “Unknown column in ‘field list'”, but column does exist
- MySQL: how to index an “OR” clause
- Is there a way to use ON DUPLICATE KEY to Update all that I wanted to insert?