数据库表的建立

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)

-> );

相关推荐
gxgldyh1 小时前
Android Framework源码解析(七):BootAnimation 启动流程解析——开机动画是如何显示出来的?
android
达达尼昂2 小时前
在 Claude Cowork 中用好 Claude Fable 5
android·人工智能·后端
sTone873753 小时前
写时复制COW的第一性理解
android·c++·flutter
sTone873753 小时前
Zygote的第一性理解
android
sTone873753 小时前
类RN框架通过Service暴露卡片渲染能力给AI Chat
android·react native
灯火不休3 小时前
Android Studio & Flutter 构建命令完全指南
android
杉氧3 小时前
Ktor 全栈之路 (5):JWT 认证全流程实战 —— 打造安全通信闭环
android·架构·kotlin
️学习的小王3 小时前
Python + MySQL 学生信息管理系统实战教程
android·python·mysql
帅次3 小时前
Android 高级工程师面试:Flutter 路由导航 近1年高频追问 18 题
android·flutter·面试
alexhilton12 小时前
MVI模式的完整历史、误解和现代Android范式
android·kotlin·android jetpack