数据库表的建立

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)

-> );

相关推荐
恋猫de小郭3 小时前
React Native 鸿蒙 2026 路线发布,为什么它的适配成本那么高?
android·前端·react native
studyForMokey3 小时前
【Android面试】窗口机制专题
android·面试·职场和发展
用户013201436034 小时前
Android 资源管理与常用布局详解|基础入门
android
陆业聪5 小时前
从 OpenClaw 到 Android:Harness Engineering 是怎么让 Agent 变得可用的
android·人工智能·ai编程
stevenzqzq7 小时前
颜色透明度转换技术文档(Android/Compose)
android
巴黎没有摩天轮Li7 小时前
Android JVMTI 接入流程
android
2501_915909068 小时前
iOS 抓包不越狱,代理抓包 和 数据线直连抓包两种实现方式
android·ios·小程序·https·uni-app·iphone·webview
城东米粉儿8 小时前
Android VCL 和 NAL笔记
android
常利兵8 小时前
从0到1,解锁Android WebView混合开发新姿势
android·华为·harmonyos
背包客(wyq)8 小时前
基于Android手机的语音数据采集系统(语音数据自动上传至电脑端)
android·网络