数据库表的建立

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)

-> );

相关推荐
花卷HJ8 分钟前
Android 通用 BaseDialog 实现:支持 ViewBinding + 全屏布局 + 加载弹窗
android
生产队队长24 分钟前
Linux:awk进行行列转换操作
android·linux·运维
叶羽西37 分钟前
Android15 EVS HAL中使用Camera HAL Provider接口
android
2501_915918411 小时前
除了 Perfdog,如何在 Windows 环境中完成 iOS App 的性能测试工作
android·ios·小程序·https·uni-app·iphone·webview
泓博1 小时前
Android状态栏文字图标设置失效
android·composer
叶羽西2 小时前
Android15系统中(娱乐框架和车机框架)中对摄像头的朝向是怎么定义的
android
Java小白中的菜鸟2 小时前
安卓studio链接夜神模拟器的一些问题
android
莫比乌斯环2 小时前
【Android技能点】深入解析 Android 中 Handler、Looper 和 Message 的关系及全局监听方案
android·消息队列
编程之路从0到12 小时前
React Native新架构之Android端初始化源码分析
android·react native·源码阅读
行稳方能走远2 小时前
Android java 学习笔记2
android·java