数据库表的建立

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)

-> );

相关推荐
mmsx3 小时前
Android 新闻资讯客户端实战:从零搭建一个完整的新闻 App
android·app·源码
三8444 小时前
PHP 绕过污点追踪构造 Webshell:反序列化引用复用与 Trait 可变函数 RCE
android
石头猫灯4 小时前
WordPress wp2shell漏洞断点逐过程到注入点
android·学习
Android打工仔5 小时前
Kotlin 协程源码解析(五):BaseContinuationImpl.resumeWith() —— Continuation 链是如何被展开的?
android·kotlin
存在morning6 小时前
【PySpark 学习笔记 三】DataFrame API 入门
android·java·数据库
YSoup6 小时前
2026 安卓面试助手APP(安卓八股、题库)
android·面试·职场和发展
xcyxiner6 小时前
flutter 运行到模拟器上
android·前端·flutter
Android-Flutter7 小时前
android Glide 源码流程分析
android·kotlin
Android-Flutter7 小时前
android Glide 使用详解
android·kotlin
恋猫de小郭7 小时前
Dart 3.13 的到底改了什么?为什么很重要?有什么坑?
android·前端·flutter