数据库表的建立

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)

-> );

相关推荐
三少爷的鞋2 小时前
别再这么写协程了!Marcin Moskała 剖析的 几个常见协程误区与重构
android
mmsx3 小时前
Android 防二次打包第一道锁:签名校验与完整性校验
android·kotlin
mmsx3 小时前
Android 混淆不等于安全:二次打包链路完整走一遍
android·kotlin
小宋10215 小时前
Agent轨迹级评测实战:工具选择、预算超限与回归门禁
android·网络·人工智能·回归
墨天梦7 小时前
D05_ViewModel与单向数据流
android·kotlin
蒸鱼Yuzheng8 小时前
Android 构建可复现性:APK 指纹、文件级差异与供应链审计
android·apk·devops·软件供应链·可复现构建
墨天梦11 小时前
D03_Compose列表与稳定身份
android·gitee·kotlin
萌新杰少11 小时前
Kuikly股票查看软件开发体验——SaiRen
android·kotlin·客户端
vilya11 小时前
把 Python 塞进 APK:Chaquopy 打包实践
android·python
用户928172673901611 小时前
Android Compose版本的AI组件库来了。
android·kotlin