The Database Model

The databse and all the tables are created.

First, you could use SHOW tables; to check the existing tables, and then SELECT * FROM ... to see the data records.

Some sample codes:

SELECT P_DESCRIPT,P_INDATE,P_PRICE,V_CODE
FROM PRODUCT
WHERE V_CODE=21344;
SELECT P_DESCRIPT,P_QOH,P_PRICE,P_QOH*P_PRICE AS TOTVALUE FROM PRODUCT;
SELECT V_NAME,V_CONTACT,V_AREACODE,V_PHONE
FROM VENDOR
WHERE V_CONTACT NOT LIKE 'Smith%';
SELECT * 
FROM PRODUCT
WHERE V_CODE IN (21344,24288);

You can copy it into the query box and submit it. Have a try!

Input your SQL code here:

Result of your query: