当前位置:网站首页>Database foundation
Database foundation
2022-07-26 07:35:00 【Take you to learn code】
Catalog
DDL Basic statement of database operation
Database operation

Those in square brackets are optional .
if not exist If it doesn't exist , Then establish a database .
Input show databases; Regret shows a little 4 A database , These are all mysql The database that comes with it .

Suppose you have created a database , Want to create another database with the same name , So it's a mistake .

If you don't want this to happen , Then you can use the following code :
create database if not exists itcast;

Input statement before quick query : Directly press the up and down keys to view
If you forget your current database , Direct input select database();
data type
value type

score double(4,1) What is shown here is that the fraction is at most four digit precision (100.0 There are four bits ), The maximum scale is 1 position ( That is, at most one decimal )
String type

char Performance ratio of varchar It is better to .

Table operations

First of all use Specific databases , To be able to show Out of the right tables;


Follow the above naming method , We can set up the corresponding table
Table operations —— add rows

Table operations —— modify


边栏推荐
- 如何关闭高位端口
- KDD2022 | 揭秘快手短视频推荐Re-ranking之谜,相关推荐新SOTA
- Devaxpress.xtraeditors.datanavigator usage
- 程序环境和预处理
- In July, glassnode data showed that the open position of eth perpetual futures contract on deribit had just reached a one month high of $237959827.
- 6. Backup and recovery of MySQL database
- API (common class 2)
- 2022.7.22DAY612
- Vscode cannot start the problem solving idea
- JWT快速入门
猜你喜欢

数据库基础

C # use log4net to record logs (basic chapter)

20220209 create a basic Servlet

NFT digital collection system development: Huawei releases the first collector's digital collection

Network Trimming: A Data-Driven Neuron Pruning Approach towards Efficient Deep Architectures论文翻译/笔记

博途PLC一阶滞后系统传递函数阶跃响应输出仿真(SCL)

Open source management system based on ThinkPHP

如何保证缓存和数据库的双写一致性?

Wrong Addition

DevExpress.XtraEditors.DataNavigator用法
随机推荐
数据库基础
Common templates for web development
3.0.0 alpha blockbuster release! Nine new functions and new UI unlock new capabilities of dispatching system
Shardingsphere data slicing
:app:checkDebugAarMetadata 2 issues were found when checking AAR metadata: 2 issues were found when
Sort: merge sort and quick sort
Speech at 2021 global machine learning conference
Deep learning model deployment
In July, glassnode data showed that the open position of eth perpetual futures contract on deribit had just reached a one month high of $237959827.
dcn(deep cross network)三部曲
如何保证缓存和数据库的双写一致性?
NFT digital collection system development: digital collections give new vitality to brands
What is message subscription and publishing?
Learning Efficient Convolutional Networks Through Network Slimming
C语言关键字extern
PR subtitle production
6. Backup and recovery of MySQL database
PXE高效批量网络装机
Abnormal (2)
tensorflow2.x中的量化感知训练以及tflite的x86端测评