数据库表的建立

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)

-> );

相关推荐
HQL_seven5 分钟前
【Activity】Android Activity详解
android
AI2中文网14 分钟前
安卓 15/16 手机软键盘遮挡输入框、布局顶不上去?已解决:重新编译即可
android·智能手机
字节暗面23 分钟前
Android APP 加固横评记录:爱加密、梆梆、网易易盾与腾讯 ACE
android·逆向工程·加固
落魄Android在线炒饭44 分钟前
Android 实战问题反推 OpenGL 概念(上)
android·opengl
booboosui1 小时前
DeepSeek 的 Worker 调得动 GitHub,调不动微信:三类 Worker 的实现差别
android
MiyamuraMiyako2 小时前
Compose LazyRow 实现尾项露出与少量数据均分
android·android jetpack
booboosui3 小时前
输入法借 350 毫秒:给 agent 打字的两条路
android
哲鲤5 小时前
Binder 不只是 IPC:从一次跨进程调用看懂 Android 与 AAOS 的架构演进
android
用户128139778165 小时前
Eyf半字节【3.0 版】正式发布|订单、单证、扫码三大核心模块全新重构
android
device_Any6 小时前
接口文档写着三个字段,接口返回了五个
android·java·linux