数据库表的建立

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)

-> );

相关推荐
STCNXPARM4 小时前
Linux camera之V4L2子系统详解
android·linux·camera·v4l2架构
2501_944525544 小时前
Flutter for OpenHarmony 个人理财管理App实战 - 账户详情页面
android·java·开发语言·前端·javascript·flutter
不急不躁1237 小时前
Android16 GTS GtsPermissionTestcases 测试,跳过权限检查
android
符哥20089 小时前
关于用Android Compose开发成不成熟的分析
android·android jetpack
蜗牛、Z9 小时前
Android 蓝牙/Wi-Fi通信协议之:蓝牙扫描ScanCallback详解
android
黄昏晓x9 小时前
Linux----进程控制
android·linux·运维
我是阿亮啊10 小时前
android中事件分发机制
android·事件分发·事件分发机制
心前阳光11 小时前
Unity 模拟父子关系
android·unity·游戏引擎
2501_9151063211 小时前
当 Perfdog 开始收费之后,我重新整理了一替代方案
android·ios·小程序·https·uni-app·iphone·webview
多多*11 小时前
2月3日面试题整理 字节跳动后端开发相关
android·java·开发语言·网络·jvm·adb·c#