数据库表的建立

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)

-> );

相关推荐
意念回复2 小时前
Transformer 系列(五):从 Block 到模型——三大架构、因果掩码与自回归生成
android·回归·transformer
松仔log3 小时前
Kotlin中级——KMP
android·开发语言·kotlin
GY-933 小时前
【Android】SQL数据库
android
GY-934 小时前
【Android】适配不同的屏幕尺寸
android
Chenpip15 小时前
安卓 14/15 上装不上:四层原因与三行检查
android·app分发·应用分发·海哈游分发·内测
TT哇6 小时前
【Android 之旅】Android 通俗易懂记
android·gitee
雨白6 小时前
工厂设计模式实战:从简单工厂到抽象工厂的演进之路
android
Digitally6 小时前
7 种主流安卓设备备份与恢复方法
android
恋猫de小郭6 小时前
Flutter HC 旋转 ANR,而且还和之前的 HCPP 问题类似
android·前端·flutter
Digitally6 小时前
如何在安卓设备上备份和恢复通话记录:完整指南
android