如何创建存储过程: 1 DELIMITER // 2 create procedure
func1()3 begin4 select *from A;5 end6 //7 DELIMITER ; View
CodeDELIMITER是分割符的意思,因为MySQL默认以";"为分隔符,如果我们没有声....
分类:
其他好文 时间:
2014-05-16 05:16:40
阅读次数:
226
1:复制表结构及数据到新表select * into 目的数据库名.dbo.目的表名 from
原表名select * into my0735home.dbo.infoMianTest from
infoMian2:备份表的一部分列(不写*而写出列的列表)select列名1,列名2,列名3 into...
分类:
其他好文 时间:
2014-05-16 05:13:37
阅读次数:
208
在任务管理器中看到sql server 2000进程的内存占用,而在sql server
2005中,不能在任务管理器中查看sql server 2005进程的内存占用,要用以下语句查看sql server 的实际内存占用:select * from
sysperfinfo where counte...
分类:
其他好文 时间:
2014-05-16 05:09:07
阅读次数:
258
准备工作: SQL> conn sys/root as sysdba
Connected. SQL> grant select on v_$sql_plan to scott; Grant succeeded.
SQL> grant select on v_$session to scott; Gr...
分类:
数据库 时间:
2014-05-16 04:56:06
阅读次数:
431
题目: Given a linked list, return the node where the
cycle begins. If there is no cycle, returnnull. Follow up: Can you solve it
without using extr...
分类:
其他好文 时间:
2014-05-16 04:50:13
阅读次数:
329
【题目】
原文:
1.6 Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?
译文:
一张图像表示...
分类:
其他好文 时间:
2014-05-15 05:43:35
阅读次数:
240
最近写程序遇到一个问题,就是发现select监听标准输出的时候遇到了死循环,具体程序如下程序一。程序的意图是每当用户在控制台有任何输入,就输出”hello world!”。
程序一:
#include
#include
#include
#include
int
main(int argc, char *argv[])
{
...
分类:
其他好文 时间:
2014-05-14 14:46:25
阅读次数:
250
不走索引的情况还是蛮多的1、条件字段选择性弱,查出的结果集较大,不走索引;2、where条件等号两边字段类型不同,不走索引;3、优化器分析的统计信息陈旧也可能导致不走索引;4、索引字段
is null 不走索引;5、对于count(*)当索引字段有not null约束时走索引,否则不走索引;6、li...
分类:
其他好文 时间:
2014-05-14 13:46:56
阅读次数:
326
公用表表达式(CTE,Common table
expression)是和派生表很相似的另一种形式的表表达式,而且具有一些重要优势。CTE 是在 SQL Server 2005 中引入的,是ANSI SQL
(1999及以后版本)标准的一部分。例:WITH USACusts AS( SELECT ....
分类:
其他好文 时间:
2014-05-14 13:26:16
阅读次数:
242
SQL:CREATE PROCEDURE PagingViewTest(
@currentPageIndex INT, --页序号 @pageSize INT, --页大小 @pageCount INT OUTPUT
--返回值,总记录数)ASBEGIN--取总记录数SELECT @p...
分类:
数据库 时间:
2014-05-14 13:15:07
阅读次数:
473