数据库表的建立

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)

-> );

相关推荐
码农coding1 小时前
android12 点击桌面应用图标启动Activity流程
android
johnsong2 小时前
深度拆解:150M循环模型如何用循环推理击败大Transformer
android·深度学习·transformer
CedarQR3 小时前
云卓 G20 遥控器 Android 开发实录:从 USB 设备到读取摇杆/按键通道值
android·linux·无人机
pengyu4 小时前
【Kotlin 协程修仙录 · 炼虚境 · 初阶】 | 虚空造物:Channel 基础与协程间通信的管道艺术
android·前端·kotlin
小强闯江湖4 小时前
ViewCompose:让原生 Android View 进入声明式时代
android·开源·kotlin
摇滚侠6 小时前
《SpringBoot 3:入门与应用实战》第 6 章 Spring Boot 最佳实践 阅读笔记 12
android·spring boot·笔记
mmsx6 小时前
Android 宠物健康服务平台实战:从架构设计到主题换肤完整解析(源码和文档)
android·架构·sqlite·app·源码·宠物
、如果6 小时前
ima Skills 自进化实战:三层结构、反馈与版本验证
android·人工智能·ai编程
hunterandroid7 小时前
自定义 View 绘制与触摸冲突:从滑动卡顿到事件分发闭环
android·前端
weixin_403810137 小时前
安卓自动化脚本 HID 硬件选购指南:蓝牙HID与OTG HID区别、成本与搭建教程
android·运维·自动化·hid·安卓自动化脚本·安卓中控