2table insert
2table insert
Employee Table
2. Product Table
3. Student Table
4. Order Table
5. Book Table
6. Customer Table
7. Invoice Table
8. Supplier Table
CREATE TABLE Supplier (
SupplierID INT PRIMARY KEY,
SupplierName NVARCHAR(100),
ContactName NVARCHAR(50),
PhoneNumber NVARCHAR(15),
Email NVARCHAR(100),
Address NVARCHAR(200),
City NVARCHAR(50),
Country NVARCHAR(50),
PostalCode NVARCHAR(10),
EstablishedDate DATE
);
9. Appointment Table
1. **Employee Table**
3. **Student Table**
4. **Order Table**
5. **Book Table**
INSERT INTO Book (BookID, Title, Author, Publisher, PublishedDate, ISBN, Price,
Genre, Pages, Stock)
VALUES (201, 'The Great Gatsby', 'F. Scott Fitzgerald', 'Scribner', '1925-04-10',
'9780743273565', 10.99, 'Fiction', 180, 100);
6. **Customer Table**
7. **Invoice Table**
9. **Appointment Table**
INSERT INTO Vehicle (VehicleID, Make, Model, Year, VIN, LicensePlate, OwnerID,
RegistrationDate, Color, InsuranceProvider)
VALUES (1001, 'Toyota', 'Camry', 2020, '1HGBH41JXMN109186', 'ABC123', 301, '2020-
05-20', 'Silver', 'AllState Insurance');
1. **Employee Table**
UPDATE Employee
SET PhoneNumber = '9876543210', Email = '[email protected]', Salary =
80000.00
WHERE EmployeeID = 1;
2. **Product Table**
UPDATE Product
SET Price = 950.99, StockQuantity = 45
WHERE ProductID = 101;
3. **Student Table**
UPDATE Student
SET Address = '456 New St, Cityville', Course = 'Data Science'
WHERE StudentID = 1001;
4. **Order Table**
UPDATE [Order]
SET Status = 'Delivered', ShippingDate = '2023-10-06'
WHERE OrderID = 5001;
5. **Book Table**
UPDATE Book
SET Price = 12.99, Stock = 90
WHERE BookID = 201;
6. **Customer Table**
UPDATE Customer
SET City = 'Uptown', PhoneNumber = '9988776655'
WHERE CustomerID = 301;
7. **Invoice Table**
UPDATE Invoice
SET TotalAmount = 550.00, Tax = 27.50, Discount = 12.00
WHERE InvoiceID = 9001;
8. **Supplier Table**
UPDATE Supplier
SET Email = '[email protected]', PhoneNumber = '4455667788'
WHERE SupplierID = 501;
9. **Appointment Table**
UPDATE Appointment
SET Status = 'Completed', Notes = 'Appointment successfully completed.'
WHERE AppointmentID = 10001;
UPDATE Vehicle
SET Color = 'Black', InsuranceProvider = 'State Farm'
WHERE VehicleID = 1001;
UPDATE TableName
SET Column1 = NewValue1, Column2 = NewValue2, ...
WHERE Condition;
1. **Employee Table**
2. **Product Table**
3. **Student Table**
5. **Book Table**
6. **Customer Table**
7. **Invoice Table**
8. **Supplier Table**
9. **Appointment Table**
DELETE FROM TableName; -- This will delete all rows in the table!