数据库表的建立

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)

-> );

相关推荐
爱勇宝1 小时前
鸿蒙生态的下半场:开发者不只要能开发,还要能赚钱
android·前端·程序员
Yeyu5 小时前
刷新一帧的艺术:invalidate / postInvalidate / postInvalidateOnAnimation全解析
android
潘潘潘6 小时前
Android OTA 升级原理和流程介绍
android
plainGeekDev12 小时前
null 判断 → Kotlin 可空类型
android·java·kotlin
plainGeekDev12 小时前
getter/setter → Kotlin 属性
android·java·kotlin
YXL1111YXL13 小时前
Handler 消息回收与协程异步执行的时序陷阱
android
恋猫de小郭14 小时前
KMP / CMP 鸿蒙版本 Beta 发布,他有什么特别之处?
android·前端·flutter
三少爷的鞋15 小时前
Android 协程并发控制:别动线程池,控制好并发语义就够了
android
weiggle1 天前
第七篇:状态提升与单向数据流——架构设计的核心
android
xingpanvip1 天前
星盘接口开发文档:本命盘接口指南
android·开发语言·css·php·lua