mysql> DROP PROCEDURE IF EXISTS PARTPRICE;
Query OK, 0 rows affected (0.00 sec)
mysql> DROP PROCEDURE PARTPRICE
-> ;
Query OK, 0 rows affected (0.00 sec)
mysql> SHOW WARNINGS;
+---------+------+-------------------------------+
| Level | Code | Message |
+---------+------+-------------------------------+
| Warning | 1289 | PROCEDURE part does not exist |
+---------+------+-------------------------------+
1 row in set (0.00 sec)
Some useful statements
mysql> SHOW CREATE PROCEDURE PARTPRICE;
Try this.
mysql> SHOW CREATE PROCEDURE PARTPRICE;
It shows you the statement used to create the procedure. This is useful to have if you didn’t create the procedure in the first place but want to know how.
| Procedure | Create Procedure
| PARTPRICE | CREATE PROCEDURE `PARTPRICE`(partid INT ,
Quantity INT,
price DECIMAL(6,2)
)
BEGIN
DECLARE discount_percent DECIMAL(6,2);
DECLARE discounted_price DECIMAL(6,2);
SET discount_percent = 15;
SET discounted_price = price - discount_percent /100*price;
IF quantity > 2 THEN
SET discounted_price = discounted_price - 2.00;
END IF;
UPDATE WIDGET
SET widget_price = discounted_price WHERE widget_id = partid;
Select * from widget;
END
|
1 row in set (0.00 sec)
Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
Post subject:
That's the only thing I'm waiting for. When final release will come up with store procedure and trigger :)
They will rock the database world. No more other databases.
Joined: 24 Mar 2004 Posts: 491
Location: Dhaka, Bangladesh
Post subject:
Hasnut,
I don't think future is not desktop application with standalone database. Don't you think? We're heading to a era where everything will be connected with everything. And few people will have complete access to the database. People will be be able to access the database according to their needs. Think about a database intelegent enough to grow up by itself. A automated databank.
You are right, but the big companies will not go for opensource database for that. Still Oracle and sql server are most popular in corporate use. _________________ Sarder Hasnut
MCSD, CIW A
Need Low Cost Prefessional Hosting Contact me