Mysql Query Screen Shot
Mysql Query Screen Shot
Tables :
Data:
Data:
Data:
Data:
Data:
Data:
Data:
Data:
Queries Create Database: create database firedup; use Database: use firedup; create Table: CREATE TABLE Table_Name (column_specifications) Customer Table: CREATE TABLE customer (CustID INT NOT NULL, PrimaryKey, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(20) NOT NULL, VARCHAR(10) NOT NULL, VARCHAR(10) NOT NULL, bigint(10), VARCHAR(10), NOT NULL, NOT NULL);
Customer Phone Table: CREATE TABLE CustomerPhone (CustID INT NOT NULL, CustPhone bigint(10) NOT NULL);
Customer Email Table: CREATE TABLE Customer Email (CustID INT NOT NULL, CustEmail VarChar(20) NOT NULL);
Orderline Table: CREATE TABLE Orderline (OrderNum ModelID PartID SerialNum Quantity QuotedPrice SellingPrice OrdersTable: CREATE TABLE Orders (OrderNum CustID OrderID INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, date NOT NULL); INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, INT (20) NOT NULL, INT (20) NOT NULL, INT (20) NOT NULL, float (20) NOT NULL, float (10) NOT NULL);
Parts Table: CREATE TABLE Parts (PartID SerialNum PartCost INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, float NOT NULL, NOT NULL,
PartSellingPrice float PartOnHand Repairs Table: CREATE TABLE Repairs (RepairID CustID RepairDate ModelID PartID SerialNum RepairCost RepairType
INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, date NOT NULL,
INT (20) NOT NULL, INT (20) NOT NULL, INT (20) NOT NULL, float NOT NULL,
Stoves Table: CREATE TABLE Stoves ( ModelID SerialNum MfgDate InspectorIns ModelPrice StovesOnHand INT (10) NOT NULL, PrimaryKey, INT (20) NOT NULL, date NOT NULL,
Inserting Data to Tables: General: Insert into tablename (values); Example: Customer Table: Insert into customer values(1,David,Roy,Witold,1.BStreet,12/1,F Street,ArrowTown,Auckland,1151,NewZealand); Using above query u can insert value into any tables. If data type is varchar means then mention with in single quotation.
View the Data: General: Select * from tablename; Example: Customer Table: Select * from customer;