MySQL Forums
Forum List  »  Triggers

Re: Syntax error in my trigger
Posted by: Devart Team
Date: August 08, 2011 06:12AM

Try to use PK + AUTO_INCREMENT.

CREATE TABLE table1(
  code INT(11) NOT NULL AUTO_INCREMENT,
  column1 VARCHAR(255) DEFAULT NULL,
  column2 VARCHAR(255) DEFAULT NULL,
  PRIMARY KEY (code)
);

INSERT INTO table4(column1, column2) VALUES('c1', 'c2'),('c3', 'c4');

SELECT * FROM table1;

+------+---------+---------+
| code | column1 | column2 |
+------+---------+---------+
|    1 | c1      | c2      |
|    2 | c3      | c4      |
+------+---------+---------+

Devart Company,
MySQL management tools
http://www.devart.com/dbforge/mysql/

Options: ReplyQuote


Subject
Views
Written By
Posted
2525
August 08, 2011 05:12AM
Re: Syntax error in my trigger
986
August 08, 2011 06:12AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.