数据库表的建立

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)

-> );

相关推荐
Coffeeee1 小时前
闲聊几句,Android老哥们,你们多久没做技改需求了
android·程序员·代码规范
萝卜er2 小时前
Fragment 生命周期与状态恢复-《Android深水区(四)》
android
萝卜er2 小时前
Intent 显式、隐式与 PendingIntent-《Android深水区(五)》
android
Kapaseker4 小时前
一文吃透 Kotlin 集合操作符
android·kotlin
三少爷的鞋6 小时前
Main-safe:现代Android 架构真正的分水岭
android
沐怡旸14 小时前
深入解析 Android Performance Analyzer (APA) 底层架构与技术原理
android
李斯维21 小时前
从历史的角度看 Android 软件架构
android·架构·android jetpack
plainGeekDev1 天前
Activity 间传值 → Navigation 参数
android·java·kotlin
用户41659673693551 天前
Android WebView 加载 file:// 离线页面调试教程
android·前端
plainGeekDev1 天前
onActivityResult → ActivityResult API
android·java·kotlin