MySQL数据库怎么建库建表???

作者:追风筝的人 | 创建时间: 2023-08-02
创建 db_stu库、tbl_stu表 , 查询出所有库以及表内容。...
MySQL数据库怎么建库建表???

操作方法

打开mySQL 敲入代码:show databases;   【按回车】    // 显示所有库; 新建库:create database db_stu ;  【按回车】 使用库:use db_stu ;   【按回车】

在新建的db_stu库中建表: create table tbl_stu( int age, float score, int name, int mark);   【按回车】

查询表内容: desc tbl_stu;  【按回车】

点击展开全文

更多推荐