0% found this document useful (0 votes)
39 views3 pages

Dbms Grocery Billing System

The document outlines the creation of a database for managing products, customers, and bills, including the structure of tables and their relationships. It includes SQL commands for creating tables, inserting data, and updating stock levels. Additionally, it provides examples of customer and product entries along with billing information.

Uploaded by

devidaspawar4378
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
39 views3 pages

Dbms Grocery Billing System

The document outlines the creation of a database for managing products, customers, and bills, including the structure of tables and their relationships. It includes SQL commands for creating tables, inserting data, and updating stock levels. Additionally, it provides examples of customer and product entries along with billing information.

Uploaded by

devidaspawar4378
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
© BID INT © QustomerID INT © illDate TIMESTAMP Result Grid | Hl} () iter Rows: [spon 5 | ra cel Contents $5 BID Customertiame BiDate ProducttD ProductName Quantity Price SubTotal b |1 — RahuMehta 2025-04-17 14:11:02 1 Mik 2 30.00 60.00 | Result Grid | HH €¥ Fiter Rows: LAST_INSERT_ID0 mot 1 RahuMehta 2025-0417 141102 2 Bread 1 20.00 20.00 | Export: FY | Wrap Call Content: 75 (CREATE DATABASE champakos USE charpaos CREATE TABLE Products ( ProductIO INT AUTO_INCRENENT PRDRARY KEY, Productone VARCHAE(L09) HOT MULL, category veRcna(50)y Pekce DECINAL(19, 2) NOT MULL, ‘Stock IMT DEFAULT © » (CREATE TABLE Customers ( Custonertiane ViGHAR() NOT MULL, Phone VAROHR(AS)s ‘na vancnen(199) PMs Bis, cars wt gts se 16 © © CREATE TABLE BAIDs ( 2 SL2LID INT AUTO_INCRENENT PRDEARY KEY, 1 (custoneri0 ant, Py ‘Uilbete THnesTP DEFANLT CURRENT TDIESTIVE, 2 Totalamount OECINIL(I®, 2), a FOREIGN KEY (CustomerID) REFERENCES Custoners(CustomerID) » CREATE THOLE eLLITReWs ( SL1LTeemIO IMF AUTO INCRENENT PRIMARY KEY, as sunt oe, n (qanetty INT NOT MULL 8 Price OECIMAL(:0, 2) NOT MULL, -~ snapshot of product price 2 FoweIGN KEY (BLL1ID) REFERENCES B{116(851110), 2 FOREIGN KEY (ProfuctID) REFERENCES Products(PreductzD) a ly 224 INSERT 1610 Products (Productllane, Category, Pricey Stock) VALUES 34 (MLR, “Dakry", 30.005 200), 35 (Bread, "Bakery" 20.00, 50), 35 Cage's "Poultry, 5.005 200), 37 (apple's “Frutt' 10.005 80)» (CRize', “Graina’y $8.00) 25095 INSERT ITO Customers (CustonerWane, Phones Email) VALUES (Cfahul Menta", "967654210", “rshulfexanple.con’)y 41 ('sneha Patil", "9123456789", “snehaesauple.con")) 424 INSERE INTO BELLE (CustomerID, TotsLAmaunt) VALUES (25 0)y 43© SELECT LAST_INSERT_10(95 44.9 instar To BiLLteens (GH111D, ProductIO, Quantity, Price) VALUES, 45 Gp 15 25 30.00)) -- 2 Hk 46 Gis 26 15 29,00)5 ~> 1 bread 27 © wonre oils 62 SET TotalAncunt = (SELECT Sun(QuantSty * Price) FRO Bi11Teens WHERE B4IIID = 2) 49 wine BLUE = 15 50 © UPDATE Products SET Stock = Stock - 2 MHERE ProductiD ~ 3 52 SELECT b.BELIID, c.Cuctonerne, b.8LLIDate, Bi.ProducttD, p.Productans, 2 DL.quantitys bisPrice, (bL.quantity * bi.Price) AS SubTotal st rnow atte b oN Btllstens bi OW b.B{LLID = b4.841150 3OIN Products p ON biProductID = p. Producti aie 082120 = 25 suns

You might also like