数据库表的建立

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)

-> );

相关推荐
私人珍藏库4 小时前
【Android】BotHub-多模型AI机器人聚合库-内置免费模型
android·人工智能·智能手机·app·工具·多功能
普马萨特4 小时前
Wi-Fi 扫描频率限制与 Android 演进全解析
android
张拭心5 小时前
Android 17 新特性:后台音频交互限制加强
android·前端
张拭心5 小时前
Android 17 新特性:ProfilingManager 新触发器
android·前端
张拭心5 小时前
Android 17 新特性:MessageQueue 无锁实现
android·前端
brycegao5 小时前
如何搭建标准化 Git 工具流,保障 Android 团队代码质量
android·ci/cd
AI科技星5 小时前
数术江湖·全卷合集 - 硬核江湖・数理史诗
android·人工智能·架构·概率论·学习方法
五月君_5 小时前
安卓也支持了!微信链接 Claude Code 保姆级教程
android·微信
柚鸥ASO优化5 小时前
一篇讲透安卓ASO!开发者千万别只盯着iOS了
android·ios·aso优化
木易 士心6 小时前
compileSdkVersion、minSdkVersion 和 targetSdkVersion —— Android 三个核心的 SDK 版本配置
android