1.插入数据:

  insert into t1(id,name) values(1,'alex');

  #向t1表中插入id为1,name为'alex'的一条数据

2.删除:

  delete from t1 where id<6;

  #删除t1表中id<6的数据

3.修改:

  update t1 set age=18;

  #把t1表中数据的age字段全部改成18

  update t1 set age=18 where age=17;

  #把t1表中的age=17的全部字段改成18

4.查看数据:

  select * from t1;

  #查看t1表中的全部数据

mysql基础_操作文件中的内容的更多相关文章

  1. mysql基础_操作数据库以及表

    1.数据库的操作 create database 数据库名:#一般创建方式 create database 数据库名 show databases;#查看所有数据 drop database 数据库名 ...

  2. java中的文件读取和文件写出:如何从一个文件中获取内容以及如何向一个文件中写入内容

    import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.Fi ...

  3. java代码将excel文件中的内容列表转换成JS文件输出

    思路分析 我们想要把excel文件中的内容转为其他形式的文件输出,肯定需要分两步走: 1.把excel文件中的内容读出来: 2.将内容写到新的文件中. 举例 一张excel表中有一个表格: 我们需要将 ...

  4. 修改tnsnames.ora文件中配置内容中的连接别名后,连接超时解决办法

    1.tnsnames.ora文件中配置内容中的连接别名:由upaydb修改为IP地址 2.连接超时 定位原因: PLSQL登录界面的数据库列表就是读的tnsname.ora中连接的别名,这个文件中连接 ...

  5. linux shell 脚本获取和替换文件中特定内容

    1.从一串字符串中获取特定的信息 要求1:获取本机IP:menu.lst为系统镜象的IP配置文件,需要从中获取到本机IP信息(从文件获取信息) timeout title live find --se ...

  6. 将XML文件中的内容转换为Json对象

    using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml;u ...

  7. iOS案例:读取指定txt文件,并把文件中的内容输出出来

    用到的是NSString中的initWithContentsOfFile: encoding方法 // // main.m // 读取指定文件并输出内容 // // Created by Apple ...

  8. Flex读取txt文件中的内容(三)

    Flex读取txt文件中的内容 1.设计源码 LoadTxt.mxml: <?xml version="1.0" encoding="utf-8"?> ...

  9. Flex读取txt文件中的内容(二)

    Flex读取txt文件中的内容 自动生成的文件 LoadTxt-app.xml: <?xml version="1.0" encoding="utf-8" ...

随机推荐

  1. Ubuntu修改终端显示的主机名、用户名、目录不同颜色

    打开终端输入:echo $PS1 输入:gedit ~/.bashrc #定位到如下代码: if [ "$color_prompt" = yes ]; then PS1='${de ...

  2. mongodb的安装部署-备份

    1.安装部署 wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.10.tgz tar -zxf mongodb-linux- ...

  3. uniapp如何使用阿里iconfont

    1.将iconfont中需要的图标,添加到购物车,然后添加到自己的项目.生成在线代码. 2.点击下载至本地.然后解压后复制 iconfont.css 文件到你的项目. 3.复制第一步生成的代码,替换i ...

  4. 使用Google提供的ZXing Core,Java生成、解析二维码

    1.maven项目中,pom.xml中引入ZXing Core工具包: <!-- https://mvnrepository.com/artifact/com.google.zxing/core ...

  5. c# base64及MD5工具类

    using System; using System.Collections.Generic; using System.Data; using System.IO; using System.Lin ...

  6. 【转载】在一台电脑上运行两个或两个以上的tomcat

    作者注: 本片为转载文章,一台电脑运行两个及以上tomcat的原因是:第一个eclipse版本是4.5,最高支持tomcat8.0版本,并且这个版本的eclipse通过svn提交和更新项目极其缓慢,无 ...

  7. 第7章:LeetCode--算法:递归问题

    70. Climbing Stairs This problem is a Fibonacci problem.F(n)=F(n-1)+F(n-2);Solving this problem by r ...

  8. lxml and 代理ip

    pip install lxml 导包From lxml import etree 1. 注意这个是本地html就直接使用etree.parse即可 2. html_etree=etree.parse ...

  9. shiro 权限过滤器 -------(1)

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABBEAAAJRCAIAAACcEbhqAAAgAElEQVR4nO3dv67sVtkHYEefhIKUIC ...

  10. ReactNative 踩坑笔记

    1.fatal error: 'React/RCTBridgeDelegate.h' file not found 这个问题是应为没有安装cocoaPods 所以无法安装ios需要的第三方库.安装co ...