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

do2

The document contains SQL code to create a 'customers' table with various attributes such as Client_Num, Customer_Age, and Income. It also includes a command to bulk insert data from a CSV file into the table and a query to count the number of entries in the 'customers' table. Additionally, there is a select statement to retrieve all records from the 'customers' table.

Uploaded by

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

do2

The document contains SQL code to create a 'customers' table with various attributes such as Client_Num, Customer_Age, and Income. It also includes a command to bulk insert data from a CSV file into the table and a query to count the number of entries in the 'customers' table. Additionally, there is a select statement to retrieve all records from the 'customers' table.

Uploaded by

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

E:\proj_1\project\SQLQuery3.

sql 1
1 create table customers(
2 Client_Num INT,
3 Customer_Age INT,
4 Gender VARCHAR(10),
5 Dependent_Count INT,
6 Education_Level VARCHAR(25),
7 Marital_Status VARCHAR(25),
8 state_cd VARCHAR(10),
9 Zipcode INT,
10 Car_Owner VARCHAR(5),
11 House_Owner VARCHAR(10),
12 Personal_loan VARCHAR(5),
13 contact VARCHAR(25),
14 Customer_Job VARCHAR(25),
15 Income INT,
16 Cust_Satisfaction_Score INT
17 );
18
19 select count(*) from customers;
20
21
22 BULK INSERT customers
23 FROM 'C:\Users\User\Desktop\proj_1\cust_add.csv'
24 WITH
25 (
26 FIRSTROW = 2, -- Set to 2 if your CSV file has a header row;
otherwise, set to 1
27 FIELDTERMINATOR = ',', -- The delimiter used in your CSV file
28 ROWTERMINATOR = '\n' -- The character used to indicate a new row
(often '\n' or '\r\n')
29 );
30 select * from customers;
31
32

You might also like