数据库表的建立

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)

-> );

相关推荐
雨声不在18 分钟前
Android文字渐变的实现
android·textview
GoldenPlayer34 分钟前
KTS语法
android
GoldenPlayer1 小时前
后台服务Service销毁逻辑+单例造成的内存泄露
android
GoldenPlayer1 小时前
自定义APK&gradle全局配置文件
android
うちは止水1 小时前
Android Hal层开发流程
android·hal
李小轰_Rex1 小时前
把手机变成听诊器!摄像头 30 秒隔空测心率 - 开箱即用
android·音视频开发
为码消得人憔悴2 小时前
Android perfetto - 记录分析memory
android·性能优化
尤老师FPGA3 小时前
使用ZYNQ芯片和LVGL框架实现用户高刷新UI设计系列教程(第四十二讲)
android·java·ui
成都大菠萝3 小时前
2-2-29 快速掌握Kotlin-过滤函数filter
android
成都大菠萝3 小时前
2-2-18 快速掌握Kotlin-扩展属性
android