数据库表的建立

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)

-> );

相关推荐
YF02116 分钟前
详解Android所有文件访问权限
android
时间的拾荒人1 小时前
MySQL C语言连接 - 从入门到实战
android·c语言·mysql
Meteors.2 小时前
Android性能优化:01. 指标体系 + 分析工具链
android
jike_20263 小时前
安卓平台免费录音转文字工具深度测评:5 款 APP 功能对比与选型指南
android·智能电视
Code Man3 小时前
Windows 下使用 Appium
android·windows·appium
码农coding3 小时前
android 12 中的VSYNC接收
android
GitLqr4 小时前
Flutter 3.44 性能飞跃:深度解析 Android Platform View 的 HCPP 新特性
android·flutter·性能优化
码农coding4 小时前
android 12 SurfaceFlinger中的CompositionEngine
android
Mem0rin5 小时前
[MySQL] 聚合函数、分组查询、连接查询
android·mysql
码龙-DragonCoding5 小时前
一键批量提取音频、提取视频
android·音视频·提取