Question:https://leetcode.com/problems/gray-code/题目:The gray code is a binary numeral system where two successive values differ in only one bit.Given ...
分类:
其他好文 时间:
2016-01-10 07:05:43
阅读次数:
179
create pro pro1@sex varchar(2),@name varchar(20) OUTPUTAsselect @sex =sex from student where name=@nameexecute pro1 '男' ,''execute sp_depends pro1 //显...
分类:
其他好文 时间:
2016-01-10 00:24:38
阅读次数:
140
查询scott用户emp表的数据文件及表空间 一.在sys用户下 1.查询表空间 SELECT TABLE_NAME,TABLESPACE_NAME FROM DBA_TABLES WHERE TABLE_NAME=’EMP’ AND OWNER=’SCOTT’ 2.查询数据文件 SELECT FI...
分类:
其他好文 时间:
2016-01-09 22:55:02
阅读次数:
257
mysql查看表结构命令,如下:desc 表名;show columns from 表名;describe 表名;show create table 表名;示例:use testDB; #切换到testDB数据库select * from columns where table_name='表名';...
分类:
数据库 时间:
2016-01-09 01:02:46
阅读次数:
177
插入数据使用Insert Into 插入if(exists(select * from sys.databases where name = 'webDB')) drop database webDBgo--创建数据库create database webDB on primary( n...
分类:
数据库 时间:
2016-01-08 23:40:12
阅读次数:
252
VariableTypeDescription%ALLUSERSPROFILE%LocalReturns the location of the All Users Profile.%APPDATA%LocalReturns the location where applications store...
1、存储过程创建1 CREATE PROCEDURE sys.sp_student2 @id int,3 @name varchar(20),4 @age int5 AS6 BEGIN7 SELECT * from Student WHERE Id=@id8 END9...
分类:
数据库 时间:
2016-01-08 20:19:57
阅读次数:
283
namecontinentAfghanistanAsiaAlbaniaEuropeAlgeriaAfricaAndorraEuropeAngolaAfrica....name:國家名稱continent:洲份1、你可以用WHERE name LIKE 'B%'來找出以 B 為開首的國家。%是萬用字元,可以用代表任何字完。找出以 Y 為開首的國家。SELECT name FROM world
W...
分类:
数据库 时间:
2016-01-08 17:12:06
阅读次数:
682
左联结select a.*,b.name as department_name from(select * from hr_position where id = {$id}) as a left join hr_department as b on a.department_id = b.id/*...
分类:
其他好文 时间:
2016-01-07 22:35:18
阅读次数:
157
orderby排序:在结果集出来之后才有意义必须在where,groupby,having之后desc(降序)/asc(升序)用字段排序用shop_price降序排列selectgoods_name,cat_id,shop_pricefromgoodswherecat_id=4orderbyshop_pricedesc;多个排序选择,先根据cat_id,然后shop_priceselectcat_id,shop_..
分类:
数据库 时间:
2016-01-07 18:38:18
阅读次数:
265