当前位置:网站首页>数据库基础
数据库基础
2022-07-26 07:29:00 【团团带你学代码】
目录
DDL数据库操作基础语句
数据库操作

方括号中的均为可选的。
if not exist表示假如不存在时,则建立数据库。
输入show databases;后悔显示出一下4个数据库,这些都是mysql自带的数据库。

假如已经创建了一个数据库,想要再创建一个名称相同的数据库,那么就会报错。

假如不希望这种情况出现,那么可以使用如下代码:
create database if not exists itcast;

快捷查询之前的输入语句:直接按上下键即可查看
假如忘记自己目前使用的数据库,直接输入select database();
数据类型
数值类型

score double(4,1)此处表示的是分数最多是四位精度(100.0共有四个位),标度最多为1位(也就是最多是一位小数)
字符串类型

char的性能比varchar要好。

表操作

此处首先要use 特定的数据库,才能够show出正确的tables;


遵循上述的命名方式,我们就可以建立起对应的表格
表操作——添加行

表操作——修改


边栏推荐
- NFT数字藏品系统开发:华为发布首款珍藏版数字藏品
- Talent column | can't use Apache dolphin scheduler? The most complete introductory tutorial written by the boss in one month [3]
- 基于Thinkphp的开源管理系统
- Usage of unity3d object pool
- Compose Canvas line chart
- 力扣(LeetCode)206. 反转链表(2022.07.25)
- The interface automation test with a monthly salary of 12k+ takes you to get started in 3 minutes
- Redis migrate tool migration error.
- Hcip--- BGP comprehensive experiment
- PostgreSQL sequence create alter nextval Curval numerical interval gap
猜你喜欢

3.0.0 alpha blockbuster release! Nine new functions and new UI unlock new capabilities of dispatching system
![PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts](/img/ba/28afaead68c9ff47d15d5c5395d9ce.png)
PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts

2021全球机器学习大会演讲稿

DevExpress.XtraEditors.DataNavigator用法

HCIP---BGP综合实验

MMOE多目标建模

机器学习相关比赛网站

:app:checkDebugAarMetadata 2 issues were found when checking AAR metadata: 2 issues were found when

Apache dolphin scheduler & tidb joint meetup | focus on application development capabilities under the development of open source ecosystem

Uncover the mystery of cloud native data management: operation level
随机推荐
Kdd2022 | uncover the mystery of Kwai short video recommendation re ranking, and recommend the new SOTA
[daily question 1] 919. Complete binary tree inserter
Simulation of transfer function step response output of botu PLC first-order lag system (SCL)
China Unicom transformed the Apache dolphin scheduler resource center to realize the one-stop access of cross cluster call and data script of billing environment
博途PLC一阶滞后系统传递函数阶跃响应输出仿真(SCL)
C# 使用Log4Net记录日志(基础篇)
Redis migrate tool migration error.
Relevant configurations of pychart: change font style and size, change picture background, and change the font color of console output
keras学习之:获取神经网络中间层的输出结果
NFT数字藏品系统开发:华为发布首款珍藏版数字藏品
依赖和关联的对比和区别
时间序列分析预测实战之ARIMA模型
HCIP---BGP综合实验
Moonbeam orbiters program: provides a new way for collectors to participate in moonbeam and Moonriver
PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts
pycharm常用快捷键
tensorflow2.x中的量化感知训练以及tflite的x86端测评
NFT数字藏品系统开发:NFT数藏 的最佳数字营销策略有哪些
NFT digital collection system development: digital collections give new vitality to brands
ARIMA model for time series analysis and prediction