create database flowershop
use flowershop
create table Customer_Table
(CustomerID int, CustomerName nvarchar(50), Addresss nvarchar(50), Contact_Number int);
create table Flower_Table
(FlowersID int, FlowersName nvarchar(50), FlowersPriceperpcs int, CustomerID int, OrderID int);
create table Order_Table
(OrderID int, Pcs int, FlowersPriceperpcs int, CustomersID int, Cash int, creditcard int);
select * from Flower_Table
select * from Customer_Table
select * from Order_Table
/*Ascending And Descending*/
select * from Customer_Table order by CustomerName ASC
select * from Customer_Table order by CustomerName DESC
/*PUTTING A NICK NAME*/
Select Customer_Table.CustomerID AS CCID from Customer_Table
Select CT.CustomerID, CT.CustomerName, Pcs from Customer_Table AS CT, Order_Table as OT
where CT.CustomerID=OT.CustomersID
Attention:
/* This is a comment symbol */
No comments:
Post a Comment