数据库表的建立

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)

-> );

相关推荐
草明1 小时前
android 蓝牙连接-兼容旧版本
android
鹏多多.1 小时前
Flutter使用screenshot进行截屏和截长图以及分享保存的全流程指南
android·前端·flutter·ios·前端框架
Flywith244 小时前
【每日一技】Warp Workflow 使用示例
android·前端
冬奇Lab5 小时前
JobScheduler与WorkManager:任务调度机制
android·源码阅读
summerkissyou19876 小时前
Android-view-绘制流程及自定义例子
android·app
常利兵6 小时前
Android “解锁”屏幕方向:APP适配新征程
android·gitee
红藕香残玉簟秋8 小时前
【安卓学习】配置开发环境
android·学习
用户69371750013849 小时前
Android R8 深度解析:为什么 Google 用R8取代 ProGuard?
android·android studio·android jetpack
seabirdssss9 小时前
联想拯救者Y7000P上使用ADB无法监听到通过USB连接的安卓设备
android·adb