create a database called "java" with a table called "points" that has two integer columns x and y (in addition to the ID primary key)
时间: 2024-01-06 07:04:24 浏览: 66
java 创建数据库
5星 · 资源好评率100%
Sure! Here's the SQL code to create the database and table you described:
```
CREATE DATABASE java;
USE java;
CREATE TABLE points (
id INT PRIMARY KEY AUTO_INCREMENT,
x INT,
y INT
);
```
This will create a new database called "java" and switch to using it. Then it will create a table called "points" with three columns: "id" (which is the primary key and will auto-increment), "x", and "y", both of which are integers.
阅读全文