数据库表的建立

1.create database mydb6_product;

2.use mydb6_product;

3.mysql> create table employees(

-> id int(5) primary key,

-> name varchar(50) not null,

-> age int(10),

-> gender varchar(10) not null,

-> salary float(10,2)

-> );

4.mysql> create table orders(

-> id int(10) primary key,

-> name varchar(100) not null,

-> price float(10,2),

-> quantity int(10),

-> category char(50)

-> );

5.mysql> create table invoices(

-> order_id int ,

-> in_date date,

-> total_amount decimal(2,10) check (total_amount > 0),

-> foreign key (order_id) references orders(id)

-> );

相关推荐
DavidSu6 分钟前
Kotlin协程原理解析
android
lxysbly23 分钟前
Android PS3模拟器下载推荐2026|安卓PS3模拟器哪个好?手机玩PS3游戏指南
android·游戏·智能手机
qq_2468397543 分钟前
记一次 Flutter 预热帧引起的初始化问题
android·flutter
阿pin1 小时前
Android随笔-要怎样与AI相处
android·人工智能·ai
Kapaseker1 小时前
Android CLI 完全指南
android·kotlin
心中有国也有家1 小时前
AtomGit Flutter 鸿蒙客户端:MoodStorage 的 CRUD 集成验证
android·服务器·flutter·华为·harmonyos
solo_992 小时前
Android window属性全解析
android
心中有国也有家2 小时前
AtomGit Flutter 鸿蒙客户端:错误处理与优雅降级策略
android·javascript·flutter·华为·harmonyos
-SOLO-13 小时前
停止gradle命令
android
_祝你今天愉快13 小时前
Android Binder 驱动 - 启动 ServiceManager 进程
android