当前位置:网站首页>The use of DML in graphical interface tools
The use of DML in graphical interface tools
2022-07-20 19:37:00 【Camellia——】
/*
Create table format
create table Table name (
Name 1 Field type 1,
Name 2 Field type 2,
Name 3 Field type 3,
...
Name n Field type n
) ;
*/
-- A database is a directory , To create a table , Need to enter the current db1 This directory
USE db1;
SELECT * FROM student;
-- matters needing attention : Use some fields to insert : The type should correspond to the order of fields
INSERT INTO student VALUE(252,' Zhang San ',15,' male ');
SELECT * FROM student;
SHOW DATABASES;
DESC student;
-- Delete data delete from Table name ; Delete full table data ( Kill all the records in the table )
-- Delete data conditionally :delete from Table name where Conditions
-- Need to delete the student table age by 15 This record of
DELETE FROM student WHERE age=10;SHOW DATABASES;-- View all databases
SHOW CREATE DATABASE db1;-- View the definition information of the database
/*
ALTER DATABASE Database name DEFAULT CHARACTER SET Character set ; Modify the default character set of the database
DROP DATABASE Database name ; Delete database
*/
DESC student;
SELECT * FROM student;
/*
alter Used to modify the basic table , It is to operate the structure of the table , For example, add , Delete , Modification typeupdate Used to modify the data in the table , Modify the value of a row or column
*/
-- ----------------------------
-- Modify the records in the table
-- Modify with conditions
-- update Table name set Field name = value where Conditional statements : Modify a single field-- Bulk changes ( Not recommended )
UPDATE student SET NAME=" Zhang San ";-- The string value can be in single quotation marks or double quotation marks-- take id=123 The name of this record is changed to " Li Si "
UPDATE student SET NAME=" Li Si " WHERE id=123;-- Modify the use of multiple fields according to conditions
-- demand : take id=252 The name and age of this record are changed to ' Wang Wu ',44
UPDATE student SET NAME=' Wang Wu ',age=44 WHERE id=252;
边栏推荐
- RedHat installation process and problems
- [arrays and common operations of arrays]
- ssh无密登录
- 谈谈MVC-MVP-MVVM的渐进使用和误解
- 【C语言】程序环境和预处理
- Magicdata Ramc data set evaluation | northwest Polytechnic University champion team sharing
- I met me | virtual digital human cultivation, facegood virtual digital human open source technology seminar
- 百度sem竞价避坑
- SSH non secret login
- Fedora TFTP configuration and test method
猜你喜欢
Community Shangxin | magichub IO open source this wave of data is quite "Ollie to"
Welcome to ICASSP 2022 - Greetings from Magic Data
INH-RFP-BSA-NPs载INH和RFP白蛋白纳米粒/载卡巴他赛的白蛋白纳米粒的制备
【数组及数组的常用操作】
Deep learning - deep understanding of normalization and batchnorm (theoretical part)
GL-HSANPs 甘草酸偶联人血清白蛋白包载白藜芦醇/大黄酸磷脂复合物血清蛋白纳米粒的制备
CentOS7中安装mysql
JZ2440开发板-TFT LCD实验
Keil 和SI编译器的代码不对齐??
DTX-GA-BSA NPs 载多西他赛和藤黄酸白蛋白纳米粒/硫鸟嘌呤白蛋白纳米粒
随机推荐
S3c2440 u-boot migration - norflash driver support - s29al016u-boot version: 2008.10 development board: mini2440
学习笔记:12864液晶模块的详细使用
DML中delete和truncate的区别
JSON、
IDA PRO新手使用教程
Array sort usage (sorting) functions can be used
YACS 两数之积 题解
STM32F103学习笔记(六) 独立看门狗and窗口看门狗
桥接模式 和 享元模式 介绍
VBS常用内置函数(2)
C语言结构体
Synchronization scripts between XSync servers
关于GCC编译常用命令
JVM调优总结 -Xms -Xmx -Xmn -Xss
ssh无密登录
DOM之元素的增删改查
Magichub accent dialogue speech recognition challenge registration begins
typedef用法及使用模板
Magichub重口音对话语音识别挑战赛报名开始
Welcome to ICASSP 2022 - Greetings from Magic Data