SQL Table1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

CREATE TABLE customer_detail(

Cust_ID INT,

First_name VARCHAR(50),

Last_name VARCHAR(50),

Email VARCHAR(50),

Postalcode CHAR(10),

Phone_no INT,

Date_of_birth DATE,

Age SMALLINT,

Address TEXT,

Salary FLOAT,

Check_in_time TIME,

Check_out_time TIME,

Lastlogin DATETIME,

Orderdate TIMESTAMP,

Purchase_amt DECIMAL(10,2),

Received_amt DECIMAL(10,2),

Isactive BOOLEAN

);
1.
SELECT * FROM customer_detail;

DESC: The above query contains 17 columns using various data types in a
table name called ‘customer_detail’.
2.
DESCRIBE customer_detail;

DESC: The DESCRIBE command would display the columns in the


‘Customer_detail’ table along with datatypes,lengths,and any constraints.

You might also like