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


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

表操作——修改


边栏推荐
- Speech at 2021 global machine learning conference
- Countdown 2 days! Based on the cross development practice of Apache dolphin scheduler & tidb, you can greatly improve your efficiency from writing to scheduling
- Network trimming: a data driven neuron pruning approach towards efficient deep architectures paper translation / Notes
- Taishan Office Technology Lecture: page width, height, size and source, and the conversion relationship between inches, centimeters and DPI
- [daily question 1] 919. Complete binary tree inserter
- NFT digital collection development: Six differences between digital collections and NFT
- NLP natural language processing - Introduction to machine learning and natural language processing (3)
- “尝鲜”元宇宙,周杰伦最佳拍档方文山将于7月25日官宣《华流元宇宙》
- NFT数字藏品系统开发:数字藏品赋予品牌新活力
- 此章节用于补充
猜你喜欢

VScode无法启动问题解决思路

DevExpress.XtraEditors.DataNavigator用法

NFT数字藏品开发:数字藏品助力企业发展

PostgreSQL sequence create alter nextval Curval numerical interval gap

Hcip--- MPLS detailed explanation and BGP route filtering

Deep learning model deployment

Crawler data analysis

PXE efficient batch network installation

【每日一题】919. 完全二叉树插入器

NFT数字藏品系统开发:文学+数字藏品的碰撞
随机推荐
NFT digital collection system development: the collision of literature + Digital Collections
Anaconda 中安装 百度飞浆Paddle 深度学习框架 教程
QT: list box, table, tree control
Keras learning part: obtaining the output results of neural network middle layer
DCN (deep cross network) Trilogy
NFT数字藏品系统开发:数字藏品赋予品牌新活力
博途PLC一阶滞后系统传递函数阶跃响应输出仿真(SCL)
OVSDB
时间序列分析预测实战之ARIMA模型
This section is for Supplement 2
0动态规划 LeetCode1567. 乘积为正数的最长子数组长度
[keras entry log (3)] sequential model and functional model in keras
HCIP---MPLS详解和BGP路由过滤
DevExpress.XtraEditors.DataNavigator用法
Idea shortcut key
元宇宙基础设施:WEB 3.0 chain33 优势分析
记一次路由器频繁掉线问题的分析、解决与发展
WCF 入门教程二
Crawler data analysis
模型剪枝三:Learning Structured Sparsity in Deep Neural Networks