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