用sql语句创建一个数据库和表怎么写?

用sql语句创建一个数据库和表怎么写?
2024-11-20 20:33:21
推荐回答(2个)
回答1:

create database abc
on
(name='枣握a_data',
filename='e:\sql\凳宴庆a_data.mdf'祥局,
size=5MB,
MAXSIZE=50MB
)
---------
create table book(
bNo char(2) not null primary key,
bName varchar(50) not null,
bAuther varchar(30) not null,
bPublisher varchar(30) not null,
bPrice money not null,
bMout int not null
)

回答2:

create database dbname;

create table student(
id int not null auto_increment primary key,
name varchar(25),
age int
);