数据库
lizzy05
这个作者很懒,什么都没留下…
展开
-
[LeetCode] 601. Human Traffic of Stadium
X city built a new stadium, each day many people visit it and the stats are saved as these columns:id,visit_date,peoplePlease write a query to display the records which have 3 or more consecutive rows and the amount of people more than 100(inclusive)....原创 2020-10-09 10:18:26 · 284 阅读 · 0 评论 -
[LeetCode] 626. Exchange Seats
Mary is a teacher in a middle school and she has a tableseatstoring students' names and their corresponding seat ids.The columnidis continuous increment.Mary wants to change seats for the adjacent students.+---------+---------+| id | stude...原创 2020-10-09 09:18:23 · 168 阅读 · 0 评论 -
[LeetCode] 627. Swap Salary
Given a tablesalary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice versa) with asingle update statementand no intermediate temp table.Note that you must write a single upda...原创 2020-10-09 00:23:27 · 112 阅读 · 0 评论 -
[LeetCode] 595. Big Countries
There is a tableWorld+-----------------+------------+------------+--------------+---------------+| name | continent | area | population | gdp |+-----------------+------------+------------+--------------+---------------+.原创 2020-10-08 23:57:44 · 116 阅读 · 0 评论 -
[LeetCode] 620. Not Boring Movies
X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and descriptions.Please write a SQL query to output movies with an odd numbered ID and a description that is not 'b原创 2020-10-08 23:51:53 · 106 阅读 · 0 评论 -
SQL truncate 、delete与drop区别
SQL truncate 、delete与drop区别相同点:1.truncate和不带where子句的delete、以及drop都会删除表内的数据。 2.drop、truncate都是DDL语句(数据定义语言),执行后会自动提交。 不同点:1. truncate 和 delete 只删除数据不删除表的结构(定义)drop 语句将删除表的结构被依赖的转载 2017-10-31 14:13:07 · 183 阅读 · 0 评论 -
Redis常用命令参考
转载自:https://kefeng.wang/2017/08/16/redis-command/Redis 命令可以直接在 Redis 命令行中执行,用于管理员维护服务器或开发人员维护数据。Redis 命令很庞杂,本文把它们按用途分类并进行了关键说明,便于对比记忆,也便于管理人员和开发人员有选择地查阅,也便于开发人员掌握第三方 Redis 开发包提供的接口。1 命令概述参考资料:...转载 2019-05-20 23:35:06 · 233 阅读 · 0 评论 -
Redis v.s Memcache
转载自https://www.cnblogs.com/457248499-qq-com/p/7392653.html观点一:1、Redis和Memcache都是将数据存放在内存中,都是内存数据库。不过memcache还可用于缓存其他东西,例如图片、视频等等;2、Redis不仅仅支持简单的k/v类型的数据,同时还提供list,set,hash等数据结构的存储;3、虚拟内存--R...转载 2019-06-24 14:28:16 · 89 阅读 · 0 评论