mysql查看表结构命令,如下:desc 表名;show columns from 表名;describe 表名;show create table 表名;use information_schemaselect * from columns where table_name='表名';顺便记下:s...
分类:
数据库 时间:
2014-07-18 21:00:25
阅读次数:
275
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs...
分类:
其他好文 时间:
2014-07-18 20:39:06
阅读次数:
556
1.DATE_FORMAT函数SELECT a.create_time FROM account_log a WHERE a.create_time >= DATE_FORMAT('2014-05-10 00:00:00','%Y-%m-%d %H:%i:%s') AND...
分类:
数据库 时间:
2014-07-18 20:35:14
阅读次数:
361
分页程序一般由两条SQL组成:SELECT COUNT(*) FROM ... WHERE ....SELECT ... FROM ... WHERE LIMIT ... 如果使用SQL_CALC_FOUND_ROWS的话,一条SQL就可以了:SELECT SQL_CALC_FOUND_ROWS ....
分类:
数据库 时间:
2014-07-18 19:24:17
阅读次数:
292
1 --查找bad sql的方法: 2 3 select * from (select buffer_gets, sql_text 4 5 from v$sqlarea 6 7 where buffer_gets >500000 8 9 order by buff...
分类:
数据库 时间:
2014-07-18 08:29:41
阅读次数:
252
Air Raid
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3035 Accepted Submission(s): 1972
Problem Description
Consider a town where...
分类:
其他好文 时间:
2014-07-17 20:12:53
阅读次数:
250
1. IS NULL 与 IS NOT NULL不能用 null 作索引, 任何包含 null 值的列都将不会被包含在索引中。 即使索引有多列这样的情况下,只要这些列中有一列含有 null,该列就会从索引中排除。也就是说如果某列存在空值,即使对该列建索引也不会提高性能。任何在 where 子句中使用...
分类:
数据库 时间:
2014-07-17 19:00:31
阅读次数:
277
原帖地址:http://www.cnblogs.com/yunfeifei/p/3850440.html#undefined1.对查询进行优化,要尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否...
分类:
数据库 时间:
2014-07-17 18:17:16
阅读次数:
338
Where is the Marble? Where is the Marble?Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the...
分类:
其他好文 时间:
2014-07-17 14:20:27
阅读次数:
376
获取表字段: select * from user_tab_columns where Table_Name='用户表' order by column_name 获取表注释: select * from user_tab_comments where Table_Na...
分类:
数据库 时间:
2014-07-17 13:34:00
阅读次数:
240