数据库表的建立

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)

-> );

相关推荐
火柴就是我36 分钟前
Flutter 混合模式下:saveLayer 混合注意点
android·flutter
Mintopia1 小时前
🎙️ React Native(RN)语音输入场景全解析
android·react native·aigc
centor1 小时前
国际版 UnitySetup-Android-Support 安装 Mac 设备
android·macos
城东米粉儿1 小时前
compose 中的附带效应笔记一
android
STCNXPARM2 小时前
Android14显示系统 - VSYNC机制
android·surfaceflinger·vsync
say_fall2 小时前
C++ 类与对象易错点:初始化列表顺序 / 静态成员访问 / 隐式类型转换
android·java·开发语言·c++
落羽凉笙2 小时前
Python基础(4)| 详解程序选择结构:单分支、双分支与多分支逻辑(附代码)
android·服务器·python
携欢2 小时前
portswigger靶场之修改序列化数据类型通关秘籍
android·前端·网络·安全
·云扬·3 小时前
MySQL四大系统库详解:作用、核心表与实用SQL查询
android·sql·mysql
普马萨特3 小时前
移动网络信号指标与单位整理(2G/3G/4G/5G Android vs IoT)
android·网络·物联网