数据库表的建立

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)

-> );

相关推荐
好的佩奇7 小时前
Dart 之可迭代对象与生成器
android·flutter·dart
_祝你今天愉快7 小时前
Paint Cavans高级绘制:[三] Canvas高阶使用技巧-变换,状态保存,离屏缓冲,粒子特效
android
小乖写代码8 小时前
提交注册验证 · WhatsApp /v2/register
android·网络·账号注册
二流小码农12 小时前
鸿蒙开发:router组件升级,彻底告别手动配置
android·ios·harmonyos
Digitally12 小时前
如何在安卓设备上使用 4 种简单方法将应用移动到 SD 卡
android
booboosui14 小时前
录一遍就会:8 种步骤、6 类失败,卡住时只修那一步
android
阿杰m14 小时前
Android源码第十五章:Camera2 与 CameraService——一帧图像怎样回到应用
android
恋猫de小郭20 小时前
Flutter Analyzer 系列坑推进,必看,AI 时代这玩意最吃你内存
android·前端·flutter
LinXunFeng1 天前
拿竞品 App 一扫,技术栈全暴露了
android·flutter·开源
Gracker1 天前
AIW:从系统机制到性能排查,一本可以对照源码的 Android 电子书
android