Quantcast
Channel: Programming – Xinyustudio
Viewing all articles
Browse latest Browse all 284

Using MySQL with C# (II): Creating a DB for programming

$
0
0

You might be interested in how to install MySQL in windows, check up this link for details.

  • Run MySQL workbench after clicking Finish

image_thumb[23]  image_thumb[24]

  • In the MySQL workbench, copy below scripts to create a new database called “MyBooks”:

create database MyBooks

  • Select the above script line, then click the thunder icon to execute the sql statement
  • A new DB is created, as shown in the left DB group:

image   image

  • Next create some table, using below scripts:

create table books
(
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30),
code VARCHAR(20),
isbn VARCHAR(20),
year INT,
PRIMARY KEY(id)
);

image  image

Now the DB and tables are ready. Next, let’s start programming mysql database.


Viewing all articles
Browse latest Browse all 284

Trending Articles