0% found this document useful (0 votes)
18 views1 page

SQL Customer Table Management Guide

The document outlines SQL commands for managing a CUSTOMER table, including creating the table, altering it to add new columns, and inserting customer records. It also includes commands for updating, selecting, and deleting records based on specific criteria. The operations focus on customer demographics and financial classifications.

Uploaded by

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

SQL Customer Table Management Guide

The document outlines SQL commands for managing a CUSTOMER table, including creating the table, altering it to add new columns, and inserting customer records. It also includes commands for updating, selecting, and deleting records based on specific criteria. The operations focus on customer demographics and financial classifications.

Uploaded by

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

4a)

CREATE TABLE CUSTOMER(CID_0478 TEXT(6) PRIMARY KEY, CName_0478 TEXT(30), Age_0478


NUMBER, Gender_0478 TEXT(8), City_0478 TEXT(10), Occup_0478 TEXT(15));
4b)
ALTER TABLE CUSTOMER ADD Con_No_0478 TEXT(12);
ALTER TABLE CUSTOMER ADD Fam_Inc_0478 NUMBER;
ALTER TABLE CUSTOMER ADD CType_0478 TEXT(10);
4c)
INSERT INTO CUSTOMER
VALUES("C047801","Aryan",21,"Male","Kol","Business","9876543210",200000,"General");
INSERT INTO CUSTOMER
VALUES("C047802","Mohan",31,"Male","Kol","Service","9876215900",350000,"General");
INSERT INTO CUSTOMER
VALUES("C047803","Sita",51,"Female","Delhi","CA","8754233210",500000,"Priviledge");
INSERT INTO CUSTOMER
VALUES("C047804","Mukesh",46,"Male","Mum","Business","59804782310",700000,"Priviled
ge");
4d)
UPDATE CUSTOMER SET CType_0478="Priviledge" WHERE Fam_Inc_0478>150000;
4e)
SELECT CID_0478,CName_0478,Gender,Con_No_0478 from CUSTOMER WHERE
Occup_0478="Student" AND Age_0478<21;
4f)
SELECT * FROM CUSTOMER WHERE CType_0478="Priviledge" AND City_0478="Kol";
4g)
DELETE FROM CUSTOMER WHERE Age_0478<15;

You might also like