第20章:更新和删除数据

P140

update customers set_emails='elmer@fudd.com' where cust_id=10005;

更新多个列,用逗号隔开。注意被指定的词有引号,null不用引号。

#为什么cust_name不能是空值# ##删除一个列,把一个列的值改为空值##

P141删除数据

select from customers where cust_id=10006; #删除cust_id=10006的的行所有信息#

《mysql必知必会》学习_第20章_20180809_欢的更多相关文章

  1. 《mysql必知必会》学习_第22章_20180809_欢

    第22章:使用视图,视图是虚拟的表,以表形式呈现的是你查询的结果.并不是说在数据库里面真的存在这个表,但是是真的存在这些数据. select cust_name,cust_contact from c ...

  2. 《mysql必知必会》学习_第19章_20180809_欢

    第19章 插入数据 P132 insert into customers VALUES(NULL,'Pep E.Lapew','100 Main Street',,Los Angeles','CA', ...

  3. 《mysql必知必会》学习_第18章_20180807_欢

    第18章 全文本搜索 P121  #创建一个新表,对表的列进行定义,定义之后,MySQL自动维护该索引# create table productnotes ( note_id  int   NOT ...

  4. 《mysql必知必会》学习_第五章_20180730_欢

    使用的工具是wamp的Mysql. P29 select prod_name from products;  #在表products中选列prod_name,顺寻不是纯粹的随机,但是没有说明排列顺序, ...

  5. 《mysql必知必会》学习_第17章_20180807_欢

    第17章:组合查询 P114 select vend_id ,prod_id,prod_price from products where prod_price <=5 ; select ven ...

  6. 《mysql必知必会》学习_第16章_20180807_欢

    第16章:创建高级联结. P106 select concat(RTrim(vend_name),'(',RTrim(vend_country),')') as vend_title from ven ...

  7. 《mysql必知必会》学习_第15章_20180806_欢

    第15章:联结表 P98 外键:外键为某个表的一列A,同时这一列包含另一个表的主键值B(B属于A,等于或者小于的关系) P99 select vend_name,prod_name,prod_pric ...

  8. 《mysql必知必会》学习_第14章_20180806_欢

    第14章:使用子查询. 子查询是镶嵌在其他查询里面,相当其他的select查询的条件来. P91 select order_num from where prod_id='tnt2';   #检索条件 ...

  9. 《mysql必知必会》学习_第13章_20180803_欢

    第13章:分组过滤. P83 select count(*) as num_prods from products where vend_id=1003; #返回vend_id=1003的产品数目总值 ...

随机推荐

  1. spring boot 之 spring security 配置

    Spring Security简介 之前项目都是用shiro,但是时过境迁,spring security变得越来越流行.spring security的前身是Acegi, acegi 我也玩过,那都 ...

  2. spring学习1

    1.<context:property-placeholder/> :用于从外部属性文件中获取Bean的配置 <context:property-placeholder locati ...

  3. Dockerfile指令详解--VOLUME 指令

    Alpine Linux是一个轻型Linux发行版,它不同于通常的Linux发行版,Alpine采用了musl libc 和 BusyBox以减少系统的体积和运行时的资源消耗.Alpine Linux ...

  4. MYSQL性能优化(3)

    优化数据库对象 1.优化表的数据类型 select * from tbl1 procedure analyse(16,256) ,会输出优化建议,结合情况优化 2.拆分表(仅Myisam) 2.1 纵 ...

  5. Linux简单学习

    参考自:http://www.runoob.com/linux/linux-tutorial.html  一.是什么 Linux 类Unix操作系统.是一个基于POSIX和UNIX的多用户.多任务.支 ...

  6. EOS keosd

    [EOS keosd] The program keosd, located in the eos/build/programs/keosd folder within the EOSIO/eos r ...

  7. RESTful API格式 图片验证码接口

    之前公司写图片验证码时用的是session 后来写接口时也想用session存验证码  不过领导说RESTful API 写接口 没有session这一说 于是就用了redis 存验证码 还有就是接口 ...

  8. FortiGate高校图书馆SSLvpn配置案例

    1.组网及需求 某高校有一台FGT系列防火墙放置于互联网出口,拓扑如下图: 现需求通过组建sslvpn web代理模式和隧道模式以实现: 1.web代理模式:能访问 http://lib.xxxx.e ...

  9. c#: 界面多语言动态切换简单实现

    终于有空整理下多语言实现思路.查阅已有方案,有用不同resx文件的,有每个控件动态设置的,有用反射去整的,颇为繁琐. 结合项目中实现方法,并做简化,实现通用的多语言切换方案,以做备忘. 它支持语言自定 ...

  10. 嵌入Python | 调用Python模块中无参数的函数

    开发环境 Python版本:3.6.4 (32-bit) 编辑器:Visual Studio Code C++环境:Visual Studio 2013 需求说明 在用VS2013编写的Win32程序 ...