数据库表的建立

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)

-> );

相关推荐
年小个大6 小时前
受 go-zero 启发,我给 Flutter 写了一套 CLI 脚手架
android·flutter·架构
Android-Flutter7 小时前
为什么说ActivityThread是主线程?
android·kotlin
余额瞒着我当琳9 小时前
C++模板初阶与STL初探
android·java·c++
知行合一。。。12 小时前
DeepAgents--01--Agent和OpenClaw的相关概念
android·数据库
汪海游龙13 小时前
告别 Play Console 手动上传:从模拟器截图到自动发版的完整流水线
android·ci/cd·github
weixin_4407841113 小时前
【IntentSeivice实现原理】
android·java·开发语言·intentservice
delta_hell13 小时前
【阅读源码--Android】动画之ValueAnimator--2
android·源码·valueanimator
delta_hell13 小时前
【阅读源码--Android】动画之辅助类
android·源码·animator
delta_hell17 小时前
【阅读源码--Android】动画之ValueAnimator--1
android·源码·valueanimator
消失的旧时光-194317 小时前
第 2 篇:Android 控制屏为什么与机器人主控使用 TCP 长连接?
android·tcp/ip·机器人