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

Project Table

The document outlines the creation of three tables: Product1, Customer, and Sales, along with their respective fields and sample data entries. It also includes the creation of an Employee table with corresponding entries. The data includes product details, customer information, sales transactions, and employee records.

Uploaded by

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

Project Table

The document outlines the creation of three tables: Product1, Customer, and Sales, along with their respective fields and sample data entries. It also includes the creation of an Employee table with corresponding entries. The data includes product details, customer information, sales transactions, and employee records.

Uploaded by

jalodarasuzee
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CREATE TABLE Product1 (

ProductID INT PRIMARY KEY,

ProductName VARCHAR(100),

Category VARCHAR(50),

PurchasePrice DECIMAL(10,2),

SellingPrice DECIMAL(10,2),

Quantity INT,

ProductStatus VARCHAR(20))

INSERT INTO Product1

VALUES (1, 'Samsung LED TV 42"', 'Electronics', 28000, 32000, 10, 'Available');
INSERT INTO Product1

VALUES (1, 'Samsung LED TV 42"', 'Electronics', 28000, 32000, 10, 'Available');

INSERT INTO Product1

VALUES (3, 'Apple iPhone 13', 'Mobile', 60000, 68000, 8, 'Available');

CREATE TABLE Customer (

CustomerID INT PRIMARY KEY,

CustomerName VARCHAR(100),

Gender VARCHAR(10),

MobileNumber VARCHAR(15),

Email VARCHAR(100),

Address VARCHAR(200),

City VARCHAR(50),

PurchaseType VARCHAR(20)

INSERT INTO Customer

VALUES (1, 'Rahul Sharma', 'Male', '9876543210', 'rahul@[Link]',

'MG Road', 'Ahmedabad', 'Cash');

INSERT INTO Customer


VALUES (2, 'Priya Patel', 'Female', '9123456789', 'priya@[Link]',

'Ring Road', 'Surat', 'Card');

INSERT INTO Customer

VALUES (3, 'Amit Shah', 'Male', '9012345678', 'amit@[Link]',

'CG Road', 'Ahmedabad', 'UPI');

CREATE TABLE Sales (

SalesID INT PRIMARY KEY,

CustomerID INT,

ProductID INT,

Quantity INT,

UnitPrice NUMBER(10,2),

TotalAmount NUMBER(10,2),

PaymentMode VARCHAR2(20),

SaleDate DATE,

Status VARCHAR2(20),

CONSTRAINT fk_sales_customer

FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID),

CONSTRAINT fk_sales_product

FOREIGN KEY (ProductID) REFERENCES Product(ProductID)

);

INSERT INTO Sales

VALUES (1, 1, 1, 1, 32000, 32000, 'Cash', SYSDATE, 'Completed');

INSERT INTO Sales

VALUES (2, 2, 3, 1, 68000, 68000, 'Card', SYSDATE, 'Completed');

INSERT INTO Sales

VALUES (3, 3, 2, 1, 52000, 52000, 'UPI', SYSDATE, 'Completed');


CREATE TABLE Employee (

EmployeeID INT PRIMARY KEY,

EmployeeName VARCHAR2(100),

Gender VARCHAR2(10),

MobileNumber VARCHAR2(15),

Email VARCHAR2(100),

Address VARCHAR2(200),

Designation VARCHAR2(50),

Salary NUMBER(10,2),

HireDate DATE,

Status VARCHAR2(20)

);

INSERT INTO Employee

VALUES (1, 'Amit Verma', 'Male', '9988776655', 'amit@[Link]',

'Vastrapur', 'Sales Executive', 25000, DATE '2023-06-01', 'Active');

INSERT INTO Employee

VALUES (2, 'Neha Joshi', 'Female', '8899776655', 'neha@[Link]',

'Adajan', 'Manager', 40000, DATE '2022-03-15', 'Active');

INSERT INTO Employee

VALUES (3, 'Rohit Mehta', 'Male', '8877665544', 'rohit@[Link]',

'Satellite', 'Sales Executive', 22000, DATE '2024-01-10', 'Active');

You might also like