数据库表的建立

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)

-> );

相关推荐
Monkey-旭21 分钟前
Android 定位技术全解析:从基础实现到精准优化
android·java·kotlin·地图·定位
树獭非懒2 小时前
Android 媒体篇|吃透 MediaSession 与 MediaController
android·架构
一起搞IT吧3 小时前
高通Camx hal进程CSLAcquireDeviceHW crash问题分析一:CAM-ICP FW response timeout导致
android·图像处理·数码相机
南风里3 小时前
Android Studio下载gradle文件很慢的捷径之路
android·ide·android studio
fatsheep洋6 小时前
文件上传 --- uploadlabs靶场
android
雨白15 小时前
Android 自定义 View:从绘制基础到实战仪表盘与饼图
android
jiunian_cn15 小时前
【Linux】线程
android·linux·运维·c语言·c++·后端
Frank_HarmonyOS1 天前
Android MVVM(Model-View-ViewModel)架构
android·架构
新子y1 天前
【操作记录】我的 MNN Android LLM 编译学习笔记记录(一)
android·学习·mnn
lincats1 天前
一步一步学习使用FireMonkey动画(1) 使用动画组件为窗体添加动态效果
android·ide·delphi·livebindings·delphi 12.3·firemonkey