分类 默认分类 下的文章

java 得到uuid

String s = UUID.randomUUID().toString();
//去掉“-”符号
return s.substring(0,8)+s.substring(9,13)+s.substring(14,18)+s.substring(19,23)+s.substring(24);

--Sqlserver 2005 跨数据库 导入数据:
--SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'OpenRowset/OpenDatasource' 的访问
--启用Ad Hoc Distributed Queries:
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure
--使用完成后,关闭Ad Hoc Distributed Queries:
exec sp_configure 'Ad Hoc Distributed Queries',0
reconfigure
exec sp_configure 'show advanced options',0
reconfigure
----------------------------------------------
/**
insert into openrowset('sqloledb','目的服务器名';'sa';'',目的数据库.dbo.表)
select * from 源数据库..表
*/
--eg:
insert into openrowset('sqloledb','127.0.0.1';'sa';'sa',newDbName.dbo.tabName)
select * from dbName..tabName

oracle 树形表结构排序select * from Tablestartwith parentid is null connect by prior id=parentidorder SIBLINGS byFUNCTIONORDER


ID NVARCHAR2
32parentid NVARCHAR232FUNCTIONNAME NVARCHAR250FUNCTIONLEVELNUMBER 0FUNCTIONURL NVARCHAR2100ICONPATH NVARCHAR22000FUNCTIONORDER NVARCHAR210

 

查询:

oracle树形表结构查询:

一、树型表结构:
节点ID 上级ID 节点名称
二、公式: 
select 节点ID,节点名称,level
from 表
connect by prior 节点ID=上级节点ID
start with 上级节点ID=节点值
--排序 这样的排序树形 结构不乱
order siblings by 节点ID

免责声明
本博客部分内容来自于互联网,不代表作者的观点和立场,如若侵犯到您的权益,请联系[email protected]。我们会在24小时内进行删除。