当前位置:网站首页>数据库基础
数据库基础
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;


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

表操作——修改


边栏推荐
- PostgreSQL UUID fuzzy search UUID string type conversion SQL error [42883] explicit type casts
- 依赖和关联的对比和区别
- Compose text and icon splicing to realize drawableleft or drawableright
- 0动态规划 LeetCode1567. 乘积为正数的最长子数组长度
- QT: list box, table, tree control
- How to convert multi row data into multi column data in MySQL
- 2021全球机器学习大会演讲稿
- 此章节用于补充
- Countdown 2 days! Based on the cross development practice of Apache dolphin scheduler & tidb, you can greatly improve your efficiency from writing to scheduling
- Data platform scheduling upgrade and transformation | operation practice from Azkaban smooth transition to Apache dolphin scheduler
猜你喜欢

Examples of financial tasks: real-time and offline approval of three scenarios and five optimizations of Apache dolphin scheduler in Xinwang bank

What is bloom filter in redis series?

C51 and MDK coexist keil5 installation tutorial

Comparison and difference between dependence and Association

NFT数字藏品开发:数字藏品与NFT的六大区别

【C语言】你真的了解printf吗?(printf典型易错,强烈建议收藏)

NFT digital collection development: digital collections help enterprise development

WCF 入门教程二

【推荐系统经典论文(十)】阿里SDM模型

DCN (deep cross network) Trilogy
随机推荐
NFT digital collection system development: digital collections give new vitality to brands
Speech at 2021 global machine learning conference
NFT digital collection development: Six differences between digital collections and NFT
Apache DolphinScheduler 2.X保姆级源码解析,中国移动工程师揭秘服务调度启动全流程
Typora免费版下载安装
【Keras入门日志(3)】Keras中的序贯(Sequential)模型与函数式(Functional)模型
TensorFlow学习日记之tflearn
[classic thesis of recommendation system (10)] Alibaba SDM model
6、组合数据类型
Compose canvas custom circular progress bar
如何保证缓存和数据库的双写一致性?
配置Flask
Kdd2022 | uncover the mystery of Kwai short video recommendation re ranking, and recommend the new SOTA
NFT数字藏品系统开发:企业如何开发属于自己的数藏平台
Learning Efficient Convolutional Networks Through Network Slimming
Deep learning model deployment
此章节用于补充2
MMOE multi-objective modeling
2021全球机器学习大会演讲稿
【每日一题】919. 完全二叉树插入器