数据库表的建立

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)

-> );

相关推荐
Jeled16 分钟前
Android 集成指南:Google 登录、Facebook 登录 与 Firebase 深入接入(实战)
android·kotlin·android studio·memcached·facebook
用户0934 分钟前
Android唤醒锁优化指南
android·面试·kotlin
aqi001 小时前
FFmpeg开发笔记(八十三)国产的视频裁剪框架AndroidVideoTrimmer
android·ffmpeg·音视频·流媒体
困到晕阙2 小时前
[Zer0pts2020]Can you guess it?
android
写点啥呢2 小时前
android取消每次u盘插入创建无用(媒体)文件夹
android·u盘·车机·aosp
杨筱毅2 小时前
【Android】RecyclerView LayoutManager 重写方法详解
android
shaominjin1232 小时前
Android 中 Padding 与 Margin 的深度解析:从概念到实战区分
android
2501_9151063211 小时前
iOS 26 APP 性能测试实战攻略:多工具组合辅助方案
android·macos·ios·小程序·uni-app·cocoa·iphone
怪兽201413 小时前
IntentService 的应用场景和使用方式?
android·面试