数据库表的建立

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)

-> );

相关推荐
2509_940880229 小时前
MySQL Workbench菜单汉化为中文
android·数据库·mysql
_李小白9 小时前
【Android FrameWork】延伸阅读: Android 进程管理
android
fatiaozhang95279 小时前
万能通刷包_非高安版_海思MV300H/MV310_原机安卓4升级安卓9_全分区烧录包支持多无线及遥控_带adb权限(2026)
android·adb·电视盒子·刷机固件·机顶盒刷机·海思安卓4升级安卓9
梁正雄9 小时前
linux服务-MariaDB 10.6 Galera Cluster 部署
android·数据库·mariadb
低调小一9 小时前
Google A2UI 协议深度解析:AI 生成 UI 的机遇与实践(客户端视角,Android/iOS 都能落地)
android·人工智能·ui
2501_915918419 小时前
iOS App的tcp、udp数据包抓取在实际开发中的使用方式
android·tcp/ip·ios·小程序·udp·uni-app·iphone
7ioik9 小时前
深入了解 MySQL InnoDB 中 MVCC 与锁的具体协作流程
android·数据库·mysql
MindCareers10 小时前
Beta Sprint Day 5-6: Android Development Improvement + UI Fixes
android·c++·git·sql·ui·visual studio·sprint