Can TMyScript support create multiple procedure, function, triggers?

Can TMyScript support create multiple procedure, function, triggers?

Postby chintatlim » Thu 02 Mar 2006 13:12

example:

delimiter $$

--
-- Procedures structure
--

CREATE PROCEDURE `testa`()
begin
SELECT * FROM stock;
end $$

CREATE PROCEDURE `testb`()
begin
SELECT * FROM stock;
end $$

CREATE PROCEDURE `testproc`()
begin
SELECT * FROM debtor;
end $$

--
-- Functions structure
--

CREATE FUNCTION `hello`(s CHAR(20)) RETURNS char(50)
begin
RETURN CONCAT('Hello, ',s,'!');
end $$


--
-- Triggers structure
--

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 $$
chintatlim
 
Posts: 22
Joined: Tue 09 Nov 2004 00:31

Postby Antaeus » Thu 02 Mar 2006 14:54

Yes. We have tested your script using MyDAC 4.30. It has finished successfully.
Antaeus
 
Posts: 2098
Joined: Tue 14 Feb 2006 10:14


Return to MySQL Data Access Components