DROP DATABASE IF EXISTS synapsedb;
CREATE DATABASE synapsedb;
USE synapsedb;
DROP TABLE IF EXISTS company;
CREATE TABLE company(name VARCHAR(10), id VARCHAR(10), price DOUBLE, location VARCHAR(10));
INSERT INTO company VALUES ('WSO2','c1',2.9563,'SL');
INSERT INTO company VALUES ('IBM','c2',3.7563,'US');
INSERT INTO company VALUES ('SUN','c3',3.8349,'US');
INSERT INTO company VALUES ('MSFT','c4',3.2938,'US');
DROP PROCEDURE If EXISTS getCompany;
CREATE PROCEDURE getCompany(compName VARCHAR(10)) SELECT name, id, price,location FROM company WHERE name = compName;

DROP PROCEDURE If EXISTS updateCompany;
CREATE PROCEDURE updateCompany(compPrice DOUBLE, compName VARCHAR(10)) UPDATE company SET price = compPrice WHERE name = compName;
