数据库表的建立

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)

-> );

相关推荐
爱勇宝7 小时前
我做了一个只用来搜歌词的小 App
android·前端·后端
众少成多积小致巨10 小时前
JNI (Java Native Interface) 技术手册中文参考指南
android·java·c++
Coffeeee17 小时前
如何使用Glide和Coil加载WebP动图
android·kotlin·glide
Kapaseker18 小时前
5 分钟搞懂 Kotlin DSL
android·kotlin
恋猫de小郭18 小时前
AI Agent 开发究竟是啥?如何用 AI 开发 Agent ?深入浅出给你一套概念
android·前端·ai编程
黄林晴18 小时前
Android 17 正式发布!target 37 一大批旧代码直接不能用了
android
Carson带你学Android19 小时前
Android 17 正式发布:AI 终于成了系统能力
android·前端·ai编程
三少爷的鞋19 小时前
当 UseCase 开始长期监听,它可能已经不是 UseCase 了
android
恋猫de小郭1 天前
Android 限制侧载新进展,谷歌联合国内厂商推验证计划
android·前端·flutter
恋猫de小郭1 天前
解读 Android 17 全新内存限制,有没有“豁免”后门?
android·前端·flutter