Exercise 2: Create database and table for users data¶
-
Connect to the local database server using SQL Server Management Studio with the following credentials:
- Server name:
(localdb)\mssqllocaldb
or if you are using the Express edition, thenlocalhost\sqlexpress
- Authentication: Windows Authentication
- Server name:
-
Use Object explorer to create a new database. The name should be your NEPTUN code.
-
Create a new table to store data from the users csv file. The columns of the table should copy the columns of the csv file with one exception: the "Location" column should be split into "City" and "Country."
Click the New query button and execute the following script to create the table.
CREATE TABLE "BXUser" ( "UserID" int, "Age" int, "City" nvarchar(1000), "Country" nvarchar(1000) )