![]() |
Ciao e benvenuto da parte degli Stati Uniti al UNIX e Linux Forum! Grazie per la visita ed unirsi alla nostra Comunità Globale.
|
|
google unix.com
|
|||||||
| Forum | Registrati | Regole Forum | Collegamenti | Album | FAQ | Members List | Calendario | Ricerca | Today's Posts | Mark Forums Read |
| UNIX e Linux Applicazioni Discuti UNIX e Linux, un software per le applicazioni. Ciò include SQL, database, middleware, MOM, SOA, EDA, CEP, BI, BPM e argomenti simili. |
Più di UNIX e Linux Forum Argomenti potreste trovare utili
|
||||
| Filo | Thread Starter | Forum | Risposte | Ultimo Post |
| la definizione di variabili | em23 | Shell scripting e di programmazione | 12 | 01-04-2009 02:49 PM |
| definizione di una stampante in qconfig | matheeq | AIX | 0 | 03-18-2008 11:55 AM |
| Definizione di coordinate X e Y all'interno di una finestra | lesnaubr | Shell scripting e di programmazione | 1 | 08-16-2007 08:19 AM |
| Definizione Variabili | sailorliones | UNIX for Dummies Domande & Risposte | 4 | 07-21-2006 03:09 PM |
| Definire le variabili al momento del boot | ianf | UNIX for Dummies Domande & Risposte | 7 | 01-07-2002 01:03 PM |
|
|
LinkBack | Thread Tools | Cerca in questo Thread | Rate Thread | Modalità di visualizzazione |
|
||||
|
Problemi con la definizione di trigger
Sono in esecuzione l'esempio dalla seguente pagina Web:
MySQL:: MySQL 5.0 Reference Manual:: 12.1.11 Sintassi CREATE TRIGGER e il problema è che attiva non può essere definito, per qualche motivo: Codice:
CREATE DATABASE IF NOT EXISTS triggertest;
USE triggertest;
CREATE TABLE test1(a1 INT);
CREATE TABLE test2(a2 INT);
CREATE TABLE test3(a3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
CREATE TABLE test4(
a4 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
b4 INT DEFAULT 0
);
delimiter |
CREATE TRIGGER testref BEFORE INSERT ON test1
FOR EACH ROW BEGIN
INSERT INTO test2 SET a2 = NEW.a1;
DELETE FROM test3 WHERE a3 = NEW.a1;
UPDATE test4 SET b4 = b4 + 1 WHERE a4 = NEW.a1;
END;
|
delimiter ;
Codice:
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delimiter | CREATE TRIGGER testref BEFORE INSERT ON test1 FOR EACH ROW BE' at line 1 Codice:
# mysql -v Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 164 Server version: 5.1.28-rc FreeBSD port: mysql-server-5.1.28_1 |
| Segnalibri |
| Thread Tools | Cerca in questo Thread |
| Modalità di visualizzazione | Vota questo thread |
|
|