数据库表的建立

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 小时前
MVVM 的理解与设计
android·android jetpack
码农阿豪8 小时前
我把 OpenClaw 装进旧安卓手机后,又折腾了 3 天:飞书、ADB、SSH 全部打通
android·智能手机·飞书
有什么事9 小时前
把安卓搬上云端:云手机系统改造与内核优化拆解
android·智能手机
方白羽10 小时前
性能分析:Android Studio Profiler
android·性能优化·app
没文化的阿浩10 小时前
【MySQL】用户管理
android·mysql·adb
FlightYe11 小时前
音视频修炼之基础理论(五):AAC格式与解析
android·linux·c++·音视频·aac
法欧特斯卡雷特12 小时前
Kotlin 2.4.20 现已发布,新特性多不多?
android·开源·全栈
摇滚侠12 小时前
《SpringBoot 3:入门与应用实战》第 12 章 JDBC 与事务 使用 JdbcTemplate 阅读笔记 31
android·spring boot·笔记
Zeaon12 小时前
别再手写筛选栏了:一个可组合的 Flutter 选择组件(5 入口 × 7 委托)
android·flutter
Michaelwubo13 小时前
mysql8 主从 HA切换
android·adb