数据库表的建立

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)

-> );

相关推荐
明君8799721 分钟前
Flutter 图纸标注功能的实现:踩坑与架构设计
android·ios
成都大菠萝29 分钟前
Android Auto开发(3)-Audio Integration
android
成都大菠萝36 分钟前
Android Auto开发(5)-Audio Integration
android
泡沫·1 小时前
7.LAMPLNMP 最佳实践
android
码码宁1 小时前
六个故事搞懂Fragment 故事1-初识Fragment - NewsHub的模块化革命
android
成都大菠萝2 小时前
Android Auto开发(0)-引言
android
q***33373 小时前
SpringMVC新版本踩坑[已解决]
android·前端·后端
F***74173 小时前
数据库课设---酒店管理系统(MySQL、VBNet)
android·数据库·mysql
踢球的打工仔3 小时前
PHP面向对象(5)
android·java·php
zhaoyufei13314 小时前
Android13删除Taskbar
android