数据库表的建立

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)

-> );

相关推荐
robotx1 小时前
AOSP设备节点权限添加相关
android
顾林海1 小时前
Android文件系统安全与权限控制:给应用数据上把“安全锁”
android·面试·操作系统
青莲8431 小时前
Android 动画机制完整详解
android·前端·面试
城东米粉儿1 小时前
android 离屏预渲染 笔记
android
未知名Android用户1 小时前
Android自定义 View + Canvas—声纹小球动画
android
_李小白2 小时前
【Android FrameWork】延伸阅读:AMS 的 handleApplicationCrash
android·开发语言·python
_李小白2 小时前
【Android FrameWork】第四十九天:SystemUI
android
Mr -老鬼2 小时前
移动端跨平台适配技术框架:从发展到展望
android·ios·小程序·uni-app
城东米粉儿3 小时前
compose measurePoliy 笔记
android