数据库表的建立

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)

-> );

相关推荐
爱睡觉1116 分钟前
Android 底层输入系统改造实录:把 gpio-keys "凭空捏造"成虚拟键盘
android
plainGeekDev7 分钟前
XML Shape/Selector → Kotlin 动态创建
android·java·kotlin
plainGeekDev11 分钟前
Java 自定义 View → Kotlin 自定义 View
android·java·kotlin
码云骑士1 小时前
Android ART运作流程
android
万能小林子1 小时前
如何将网页在线转APP?5种打包工具对比速成指南(含在线/手机/电脑方案)
android·ios·uni-app·web app·wap2app·app打包·app封装
梅塔鲁1 小时前
Kotlin成安卓开发首选
android
zhangphil1 小时前
Android Coil 3 extend ImageRequest‘s custom method/function,Kotlin(2)
android·kotlin
诸神黄昏EX1 小时前
Android 性能优化【篇五:应用启动分析流程】
android
执念、坚持1 小时前
解决 vscode 中导入 android aosp 源码卡顿问题
android·ide·vscode
码云骑士1 小时前
Android ADB常用命令
android·adb