基本信息
    
    
        
    
    
        
        
    
    
        
        
    
    
    
源码名称:sql子查询示例代码
源码大小:1.53KB
文件格式:.sql
开发语言:SQL 
更新时间:2015-06-10
        ×
        
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
       源码介绍
    
    
                                
        
select project_id from PLN_project  --vs中的选择下拉项目
SELECT * FROM dfn_wdgl_jgzl_tree --左侧SELECT * FROM dfn_wdgl_jgzl_tree where project_id = 'default'
select  *  from dfn_wdgl_jgzl --右上select  *  from dfn_wdgl_jgzl where main_sid in ('400000062')
select * from doc_ddi_attach  --右下select * from doc_ddi_attach where attach_type='1718' and ddi_sid='400000001' 
select  *  from doc_ddi_attach where attach_type='1718' and ddi_sid='1' 
delete doc_ddi_attach where attach_name='360wallpaper' or attach_name='Microsoft Publisher Document'or
 attach_name='456 - 副本 (2)' or attach_name='阿斯蒂芬' or attach_name='新建 360压缩 ZIP 文件'
select * from dfn_wdgl_jgzl_tree1 
select * from dfn_wdgl_jgzlTest 
select * from doc_ddi_attachTest 
 
  
SELECT sid,parent_id,lcode,code,display_id,project_id,Title FROM dfn_wdgl_jgzl_tree
insert into dfn_wdgl_jgzl(sid,title) values('40000000','dsa');
select * from dfn_wdgl_jgzl where main_sid=(select parent_id from dfn_wdgl_jgzl_tree group by parent_id)
select COUNT(*) from dfn_wdgl_jgzl_tree1 
select sid from dfn_wdgl_jgzl_tree1 where Title=''
select * from dfn_wdgl_jgzl_tree1 where Title='test'
SELECT attach_sid,ddi_sid,attach_ext,local_url,server_url FROM doc_ddi_attach a INNER JOIN dfn_wdgl_jgzl b 
ON a.ddi_sid = b.sid AND a.attach_type ='1718' WHERE b.project_id ='yjgc-01'
truncate table dfn_wdgl_jgzl_tree1
alter table dfn_wdgl_jgzl_tree1 add no int
create table dfn_wdgl_jgzl_tree1
(
	sid int not null,
	parent_id int ,
	Title varchar(50)
)