数据库表的建立

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)

-> );

相关推荐
spencer_tseng3 小时前
Eclipse Oxygen 4.7.2 ADT(android developer tools) Plugin
android·java·eclipse
来来走走5 小时前
Android开发(Kotlin) 协程
android·java·kotlin
河铃旅鹿5 小时前
Android开发-java版:Framgent
android·java·笔记·学习
2501_9160088910 小时前
手机抓包app大全:无需root的安卓抓包软件列表
android·ios·智能手机·小程序·uni-app·iphone·webview
百锦再10 小时前
第18章 高级特征
android·java·开发语言·后端·python·rust·django
gcygeeker11 小时前
安卓 4.4.2 电视盒子 ADB 设置应用开机自启动
android·adb·电视盒子
小驰行动派11 小时前
安卓上的极简番茄钟 | 开源
android·开源
jzlhll12311 小时前
android抽屉DrawerLayout在2025的沉浸式兼容
android
基哥的奋斗历程11 小时前
Kotlin_Flow_完整使用指南
android·开发语言·kotlin
j***827011 小时前
【玩转全栈】----Django连接MySQL
android·mysql·django