我的sql数据库 操作范例

建一个SpringWater 的数据库

sql server:   create database SpringWater

mysql:  create schema

创建一个模式

create schema 模式名 authorization 用户名


 

在该模式下建一个表

create table [模式名.S](
 S# char(20) not null primary key,
 Sname char(20) not null,
 Age int,
 Sex char(5),
 check (Age between 0 and 120)
)


 

你可能感兴趣的:(我的sql数据库 操作范例)