数据库表的建立

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)

-> );

相关推荐
心中有国也有家6 小时前
AtomGit Flutter 鸿蒙客户端:ModalBottomSheet 实战
android·javascript·学习·flutter·华为·harmonyos
YSoup7 小时前
Android Stuidio中下载TRAE插件依赖的JCEF后打不开
android
2401_894915538 小时前
Geo搜索优化排名源码部署搭建全流程详解
android·开发语言·flask·php·精选
星释9 小时前
鸿蒙智能体开发实战:34.鸿蒙壁纸大师 - 提示词工程与优化
android·华为·harmonyos·鸿蒙
blanks20209 小时前
android 编译问题记录
android
bobuddy10 小时前
平台总线(platform bus)
android
plainGeekDev10 小时前
libs 目录 → Gradle 依赖管理
android·java·kotlin
帅次11 小时前
Android 高级工程师面试:Flutter Widget 体系 近1年高频追问 20 题
android·flutter·面试·element·widget·setstate·renderobject
帅次12 小时前
Android 高级工程师面试:Jetpack 核心 近1年高频追问 20 题
android·面试·协程·jetpack·stateflow·lifecycle
爱笑鱼12 小时前
Handler(四):Handler 卡顿怎么定位?从 Slow delivery 到 Slow dispatch
android