数据库表的建立

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)

-> );

相关推荐
Kapaseker1 小时前
Android 开发来看看 Kotlin 2.4.0 更新了个啥
android·kotlin
前端与小赵1 小时前
快速生成安卓证书并打包生成安卓apk(保姆教程)
android·前端
吃螺丝粉2 小时前
MySQL 5.7 到 9.7.0 LTS 升级核心指南
android
-SOLO-2 小时前
TraceFix 自动添加trace信息
android
yuananyun3 小时前
APP 图标规范与设计全攻略:iOS/Android/Web 一次设计多端合规,快速出图
android·前端·ios
sun0077003 小时前
dns命令排查解析nslookup
android
问心无愧05134 小时前
ctf show web入门99
android·前端·笔记
plainGeekDev4 小时前
Handler/Looper → Coroutines
android·java·kotlin
awu的Android笔记4 小时前
限速/丢包/乱序/重复/篡改:Android 弱网模拟的 5 把利刃
android·tcp/ip
niech_cn4 小时前
uniapp开发App(iOS、Android、鸿蒙Next)之配置pages.json 页面路由(三)
android·ios·uni-app