`
chenjunt3
  • 浏览: 14436 次
  • 性别: Icon_minigender_1
  • 来自: 重庆
社区版块
存档分类
最新评论

常用SQL

阅读更多

--NC建库
CREATE TABLESPACE NNC_DATA01 DATAFILE 'E:\oracle\product\10.2.0\oradata\orcl\nnc_data01.dbf' SIZE 500M AUTOEXTEND ON NEXT 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K ;
CREATE TABLESPACE NNC_DATA02 DATAFILE 'E:\oracle\product\10.2.0\oradata\orcl\nnc_data02.dbf' SIZE 300M AUTOEXTEND ON NEXT 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K ;
CREATE TABLESPACE NNC_DATA03 DATAFILE 'E:\oracle\product\10.2.0\oradata\orcl\nnc_data03.dbf' SIZE 500M AUTOEXTEND ON NEXT 100M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 512K ;
CREATE TABLESPACE NNC_INDEX01 DATAFILE 'E:\oracle\product\10.2.0\oradata\orcl\nnc_index01.dbf' SIZE 500M AUTOEXTEND ON NEXT 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K ;
CREATE TABLESPACE NNC_INDEX02 DATAFILE 'E:\oracle\product\10.2.0\oradata\orcl\nnc_index02.dbf' SIZE 300M AUTOEXTEND ON NEXT 50M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K ; 
CREATE TABLESPACE NNC_INDEX03 DATAFILE 'E:\oracle\product\10.2.0\oradata\orcl\nnc_index03.dbf' SIZE 500M AUTOEXTEND ON NEXT 100M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K ; 
CREATE USER NC50 IDENTIFIED BY NC50 DEFAULT TABLESPACE NNC_DATA01 TEMPORARY TABLESPACE temp;
GRANT connect,dba to NC50;


--根据公司编码查询公司主键
select c.pk_corp from nc.bd_corp c where c.unitcode='3101'

--根据凭证号、公司主键查询分录
select *
  from nc.gl_detail d
 where d.pk_voucher = '1004A11000000000H7P1'
   and d.pk_corp = '1004'
--分录号
and d.detailindex=219

--根据凭证主键查询作证号
select v.no from nc.gl_voucher v where v.pk_voucher='1004A11000000000H7P1'
/*
select
  acc.subjcode,
  acc.subjname
from bd_accsubj acc,
     bd_glorgbook orgbook,
     bd_corp corp,
     bd_glorg org
where acc.pk_glorgbook = orgbook.pk_glorgbook
  and orgbook.pk_glorg = org.pk_glorg
  and org.pk_entityorg = corp.pk_corp
  and corp.unitcode = '5002'
  and acc.subjcode = '221114'
*/
--根据公司编码查询公司目录主键
select g.pk_glorg,g.* from bd_glorg g where g.glorgcode='5003'
--根据公司目录主键查询公司账薄主键
select bd_glorgbook.pk_glorgbook, bd_glorgbook.*
  from bd_glorgbook
 where bd_glorgbook.pk_glorg = '0001A1100000000ARH5O'

select acc.subjcode, acc.subjname
  from bd_accsubj acc
 where acc.pk_glorgbook = '0001A1100000000ARHAZ'

--根据公司和科目编码查询余额   
select b.pk_balance,b.*
  from bd_corp c, bd_accsubj a, gl_balance b
 where a.pk_corp = c.pk_corp
   and c.unitcode = '3101'
   and a.subjcode = '260101'
   and a.pk_accsubj = b.pk_accsubj
   and a.dr = 0
   and b.year='2010'

   
--根据科目编码查询辅助核算
select distinct info.bdname, info.*
  from bd_subjass s, bd_accsubj a, bd_bdinfo info
 where a.pk_accsubj = s.pk_accsubj
   and s.pk_bdinfo = info.pk_bdinfo
   and a.subjcode = '6601'
   
 select distinct bd_bdinfo.bdname
   from bd_accsubj, bd_subjass, bd_bdinfo
  where bd_accsubj.pk_accsubj = bd_subjass.pk_accsubj
    and bd_subjass.pk_bdinfo = bd_bdinfo.pk_bdinfo
    and (bd_accsubj.pk_corp = '0001' or bd_accsubj.pk_corp is null)
    and nvl(bd_accsubj.dr, 0) = 0
    and nvl(bd_accsubj.endflag, 'N') = 'Y'
    and bd_accsubj.subjcode = '66013301'
   
   
   

--根据年度、会计期间、公司编码、凭证号查询分录
select v.no, v.pk_voucher, d.*
  from gl_voucher v, gl_detail d, bd_corp c
 where v.pk_voucher = d.pk_voucher
   and v.pk_corp = c.pk_corp
   and v.year = '2009'
   and v.period = '08'
   and c.unitcode = '1101'
   and v.no = '251'
   and v.dr = 0

--根据年度、公司编码、凭证主键查询科目
select a.pk_accsubj, a.subjcode, a.subjname, d.localcreditamount
  from gl_voucher v, bd_corp c, gl_detail d, bd_accsubj a
 where v.year = '2010'
   and c.unitcode = '3101'
   and c.pk_corp = v.pk_corp
   and v.pk_voucher = d.pk_voucher   
   and a.pk_accsubj = d.pk_accsubj
   and d.pk_voucher = '1004AQ1000000001OV9K'

--根据公司和科目编码查询科目主键   
select pk_accsubj, g.glorgcode,acc.dispname, acc.*
  from nc.bd_accsubj acc, nc.bd_glorgbook gb, nc.bd_glorg g
 where acc.subjcode like '660105%'
   and acc.pk_glorgbook = gb.pk_glorgbook
   and gb.pk_glorg = g.pk_glorg
   and g.glorgcode = '5101'
   
----------------------------------------------------------------------------------------------
--2010/1/6            查询总账期初余额
--subj.balanorient科目方向:1:借;2:贷
select subj.subjcode 科目编码,
       subj.subjname 科目名称,
       case subj.balanorient
         when 1 then
          sum(gl.localdebitamount)
         when 2 then
          sum(gl.localcreditamount)
       end 期初余额
  from nc.gl_detail gl, nc.bd_corp corp, nc.bd_accsubj subj
 where gl.pk_corp = corp.pk_corp
   and gl.pk_accsubj = subj.pk_accsubj
   and corp.unitcode = '00'
   and gl.yearv = '2009'
   and gl.periodv = '00'
   and gl.dr = 0
 group by subj.subjcode, subj.subjname, subj.balanorient
 order by subj.subjcode
----------------------------------------------------------------------------------------------
--根据收支项目与公司编码取收支项目主键
select c.pk_costsubj
  from nc.bd_costsubj c, nc.bd_corp corp
 where c.costcode = 'C224104'
   and c.pk_corp = corp.pk_corp
   and corp.unitcode = '00'

----------------------------------------------------------------------------------------------
--查看汇率
select decode(currtypecode,
              'HKD',
              '02',
              'USD',
              '03',
              'EUR',
              '12',
              'JPY',
              '05',
              '01') c_cur_no,
       currtypecode,
       currtypename,
       substr(ratedate, 0, 7) rateperiod,
       ratedate,
       rate
  from nc.bd_currtype, nc.bd_currrate, nc.bd_currinfo
 where (bd_currtype.pk_currtype = bd_currinfo.pk_currtype)
   and (bd_currinfo.pk_currinfo = bd_currrate.pk_currinfo)
   and (bd_currrate.pk_corp = '0001')
   --and (currtypecode = 'USD' and substr(ratedate, 0, 7) = '2009-12')
 order by currtypecode, ratedate



----------------------------------------------------------------------------------------------
--停止后台任务
update pub_alertregistry p set p.enabled = 'N' where p.accountpk = '0001AA100000000324SZ'
----------------------------------------------------------------------------------------------
--查询一个列属于哪个表
select table_name, column_name from user_tab_columns where column_name = 'DJDL';
--查询一个表的列
select c.COLUMN_NAME from user_tab_columns c where c.TABLE_NAME = 'ARAP_DJZB' AND c.COLUMN_NAME like 'ZYX%'
select concat('a.',c.COLUMN_NAME) from user_tab_columns c where c.TABLE_NAME = 'ARAP_DJZB' AND c.COLUMN_NAME like 'ZYX%'

select a.djdl,a.djlxbm,b.zyx2 from 
arap_djzb a, arap_djfb b
where trim(a.djbh) = trim(b.djbh)
and length(b.zyx2)!=0
----------------------------------------------------------------------------------------------
--查询单据模板上自定义项的配置情况
select t.bill_templetname 单据名称,
       b.defaultshowname 显示名称,
       b.itemkey 项目主键,
       b.editformula 编辑公式,
       decode(b.table_code,'main','表头','table','表体') 位置
  from nc.pub_billtemplet t, nc.pub_billtemplet_b b
  --pub_billtemplet t, pub_billtemplet_b b
 where t.pk_corp = '0001'
   and t.pk_billtemplet = b.pk_billtemplet   
   and (b.itemkey like 'zyx%' or instr(b.editformula,'zyx')<>0)
   
   select distinct f.zyx6 from nc.arap_djfb f  
----------------------------------------------------------------------------------------------
--Q:在会计平台科目分类定义节点通过复制的方式会同时复制对照表但目标单位生成凭证时对照表没有启作用
--原因是因为影响因素如表体科目还是源单位的,并没有自动转换成目标单位的
--科目分类定义
select * from dap_insubjclass  s where  s.insubjclasscode = 'EC34' and s.pk_corp = '1014';

select * from dap_insubjclassfactor f where f.pk_insubject = '1020AQ1000000000JSYQ';
--科目对照表
select * from dap_subjview s where s.pk_insubject  = '1020AQ1000000000JSYQ';

select * from bd_corp c where c.unitcode = '3301';

select * from bd_accsubj a where a.pk_accsubj = '1014AA100000000003B7';


select corp.unitcode 公司编码,
       corp.unitname 公司名称,
       insubjclass.insubjclasscode 科目分类编码,
       insubjclass.insubjclassname 科目分类名称,
       v.factor1 表体科目PK,
       v.factorname1 表体科目名称,
       v.subjcode 入账科目PK
  from bd_corp corp
  left join dap_insubjclass insubjclass on corp.pk_corp =
                                           insubjclass.pk_corp
  left join dap_subjview v on insubjclass.pk_insubjclass = v.pk_insubject
  where corp.unitcode = '5002'
  and insubjclass.insubjclasscode = 'EC34'--低耗品科目
----------------------------------------------------------------------------------------------

--成本系数定义明细
select distinct corp.unitcode,
                corp.unitname,
                dept.deptname,
                k.name,
                c.coefficientname,
                c.coefficientcode,
                cb.value,
                cb.ts
  from nc.fc_coefficient_b  cb,
       nc.fc_coefficient    c,
       nc.bd_corp           corp,
       nc.bd_deptdoc        dept,
       nc.irp_insurancekind k
 where cb.pk_coefficient = c.pk_coefficient
   and cb.pk_dwbm = corp.pk_corp
   and cb.pk_deptdoc = dept.pk_deptdoc
   and cb.pk_object = k.pk_insurancekind
   and cb.kjnd = '2010'
   and cb.kjqj = '06'
   --and c.coefficientcode = 25

 order by  cb.ts desc;



----------------------------------------------------------------------------------------------

--结账状态
--固定资产
select * from fa_closebook where pk_corp=1006 and accyear=2010;

--总账
select * from gl_syssettled;--可以手动在此插入一条记录
select glorgbook.pk_glorgbook 主体账薄主键,glorgbook.glorgbookname 主体账薄名称  from bd_glorgbook glorgbook ,bd_glorg glorg
where glorgbook.pk_glorg = glorg.pk_glorg
and glorg.glorgcode = '8501';


----------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------
--查询单据zyx是否有值
select distinct f.zyx1,z.djlxbm
  from nc.arap_djzb z, nc.arap_djfb f
 where 
 z.djbh = trim(f.djbh)
 and z.djlxbm = '23A8'

----------------------------------------------------------------------------------------------

--更新所有用户密码为1
update sm_user u set u.user_password = 'jlehfdffcfmohiag',u.pwdlevelcode = ''

select * from sm_user u
where u.user_code in ('zbjjl','cqls','zbfuzhaofui','tbadmin','100000524');
--锁定用户
update sm_user u set u.locked_tag = 'Y'
where u.user_code not in ('zbjjl','cqls','zbfuzhaofui','tbadmin','100000524');


----------------------------------------------------------------------------------------------
--结算方式
select * from nc.bd_balatype
----------------------------------------------------------------------------------------------

---单据查询时后台取出的一段语句
select pk_finindex,
       pk_sys,
       pk_proc,
       pk_vouchentry,
       gl_voucher.no voucherno,
       procmsg,
       gl_voucher.pk_vouchertype vouchertype,
       bd_vouchertype.vouchtypename vouchtypename,
       bd_glorg.pk_glorg,
       bd_glorgbook.pk_glbook,
       bd_glorg.glorgname glorg_name,
       bd_glorgbook.glorgbookname glbook_name,
       checked.user_name checked,
       manager.user_name manager,
       totaldebit,
       totalcredit,
       prepareddate,
       period,
       dap_finindex.pk_rtvouch,
       dap_finindex.errmsg,
       gl_voucher.tallydate
  from dap_finindex,
       gl_voucher,
       bd_vouchertype,
       sm_user prepared,
       sm_user checked,
       sm_user casher,
       sm_user manager,
       bd_glorg,
       bd_glorgbook
 where dap_finindex.pk_vouchentry = gl_voucher.pk_voucher(+)
   and gl_voucher.pk_vouchertype = bd_vouchertype.pk_vouchertype(+)
   and gl_voucher.pk_prepared = prepared.cUserId(+)
   and gl_voucher.pk_checked = checked.cUserId(+)
   and gl_voucher.pk_casher = casher.cUserId(+)
   and gl_voucher.pk_manager = manager.cUserId(+)
   and bd_glorg.pk_glorg(+) = dap_finindex.pk_glorg
   and bd_glorgbook.pk_glbook(+) = dap_finindex.pk_glbook
   and bd_glorgbook.pk_glorg(+) = dap_finindex.pk_glorg
   and (procmsg in ('1001A1100000000CC547', '1001AQ100000000CB9H5',
        '1001AQ100000000CB7HQ', '1001AQ100000000CC3RN',
        '1001AQ100000000CB7D3', '1001AQ100000000CB7I8',
        '1001AQ100000000CC3RT', '1001AQ100000000CC1BF',
        '1001AQ100000000CC3KQ', '0001AQ100000004LI2BQ',
        '1001A1100000000CB5M9', '1001AQ100000000CB7HX',
        '1001A1100000000CB6F0', '1001AQ100000000CB7DU',
        '1001A1100000000CC541', '1001AA100000000CBDC8',
        '1001A1100000000CB6E4', '1001AQ100000000CB7XO',
        '1001AQ100000000CC3KJ', '1001A1100000000CB6E1'))

----------------------------------------------------------------------------------------------


----------------------------------------------------------------------------------------------

--成本要素科目对照
select a.pk_glrapport, a.subjcode, b.subjname, a.itemcode, c.itemname
  from fc_glrapport a
  left join bd_accsubj b on a.subjcode = b.subjcode
  left join fc_costitemdefine c on a.itemcode = c.itemcode
 where (b.Pk_Glorgbook = '0001')
    or (b.pk_corp is null And b.Pk_Glorgbook is null)
 order by a.subjcode;

select a.pk_glrapport, a.subjcode, b.subjname, a.itemcode, c.itemname
  from fc_glrapport a, bd_accsubj b, fc_costitemdefine c
 where a.subjcode = b.subjcode(+)
   and a.itemcode = c.itemcode(+)
   and ((b.Pk_Glorgbook = '0001') or
       (b.pk_corp is null And b.Pk_Glorgbook is null))
 order by a.subjcode;
----------------------------------------------------------------------------------------------
--凡是公司不设置本位币的公司
select * from pub_sysinit where initname like '%本位币%' and pkvalue is null;
--将凭证子表中的垃圾数据清理掉
delete from gl_detail d where not exists( select pk_voucher from gl_voucher v where v.pk_voucher=d.pk_voucher);
--检查会计平台还存在未处理的实时凭证
SELECT dap_finindex.*,settlecentername FROM dap_finindex left join bd_settlecenter on(dap_finindex.pk_corp=bd_settlecenter.pk_corp) WHERE flag = 2 AND pk_sys = 'FTS' AND destsystem=1 and nvl(dap_finindex.dr,0)=0 and nvl(bd_settlecenter.dr,0)=0;


----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------

--检查审批流是否定义
select pk_wf_def, fatherpk, processDefID, node_name, node_type, billmaker, billmaker_name, billmaker_type, createdate,
version, workflow_type from pub_wf_def where validation = 1 and pk_corp = '1001' and busitype = 'KHHH0000000000000001'
and
billtype = 'ZG54' and ( node_type = '2' or node_type = '3' ) 
----------------------------------------------------------------------------
--单据类型管理表,手工设置4位类型代码
select * From bd_billtype where pk_billtypecode='TB'
update bd_billtype set pk_billtypecode='TB10' where pk_billtypecode='TB'
----------------------------------------------------------------------------
--手工做vo对照_主表
insert into pub_votable(approveid,    billid,    billno,    billvo,  busitype,   def1,def2,
def3,dr,   headbodyflag,headitemvo,                itemcode,            operator,     pk_billtype,pk_corp,pkfield,
   votable,           pk_votable,            ts) 
                 values('vapproveid','pk_apply','vbillcode','nc.vo.trade.pub.HYBillVO','pk_busitype',NULL,NULL,NULL,
NULL,'Y',       'nc.vo.shsh.stock.tb1010.StockApplyVO','shsh_stock_apply',   'voperatorid','TB10',     NULL,
   'pk_apply','shsh_stock_apply','0001AA10000000001RK3','2007-09-27 16:59:14') 
--手工做vo对照_子表
insert into pub_votable(approveid,billid,billno,billvo,                    busitype,def1,def2,def3,dr,  headbodyflag,
headitemvo,                             itemcode,            operator,pk_billtype,pk_corp,pkfield,     votable,
              pk_votable,            ts) 
                 values('',       '',    '',    'nc.vo.trade.pub.HYBillVO','',      NULL,NULL,NULL,NULL,'N','nc.vo.
shsh.
stock.tb1010.StockApplyBVO','shsh_stock_apply_b','',      'TB10',     NULL,
   'pk_apply','shsh_stock_apply_b','0001AA10000000001RK4','2007-09-27 17:12:01') 
----------------------------------------------------------------------------
--自动生成单据编码
insert into pub_billcode_rule(billcodeshortname,controlpara,day,dr,isautofill,ischeck,ishaveshortname,ispreserve,
lastsn,
month,
object1,object2,pk_billcoderule,pk_billtypecode,snnum,snresetflag,ts,year)
values('ZA','Y',20,0,'Y','Y','Y','Y','0000',12,NULL,NULL,'smTB1000000000000001','TB10',4,
0,'2007-09-27 18:55:32','07')
----------------------------------------------------------------------------
--操作员人员关联关系
select psn.psnname from bd_psndoc psn inner join sm_userandclerk on sm_userandclerk.pk_psndoc = psn.pk_psndoc
inner join sm_user on sm_user.cuserid = sm_userandclerk.userid 
----------------------------------------------------------------------------
--查询模板的单据状态下列值初始化
update pub_query_condition set consult_code='I,,审批不通过,审批通过,审批进行中,提交态,作废态,冲销态,终止(结算)态,冻结
态,自由
态,待经办,已经办,已核查,已作废' 
where field_code like '%billstatus' and pk_templet in(
select id from pub_query_templet where model_code in ('91012010'))
----------------------------------------------------------------------------
--复制数据库里的类似数据,声称INSERT语句
select 'insert dap_defitem values('+attrname+','+CONVERT(char(1),dr)+','+headflag+','+itemname+','+CONVERT(char(1),
itemtype)
+','+pk_billtype+','+pk_voitem+','','+ts+')' from dap_defitem where pk_billtype='TB52'
----------------------------------------------------------------------------
--手动增加打印模板中的项
insert into PUB_PRINT_DATAITEM (DR, IDATATYPE, ITYPE, PK_CORP, PK_VARITEM, PREPARE1, RESID, TS, USERDEFFLAG, VNODECODE,
VTABLECODE, VTABLENAME, VVAREXPRESS, VVARNAME)
values (0, null, null, [email=]'@@@@'[/email], '0001AA10000000ZY1220', null, null, '2007-01-21 15:23:37', null, 'TC0106', null, null,
't_pk_psndoc', '报销人(表尾)');
----------------------------------------------------------------------------
--修改单据模板模板的字段类型
update pub_billtemplet_b set reftype='5'
where pk_billtemplet in
(select pk_billtemplet from pub_billtemplet where nodecode like 'TD%')
and datatype=2 and (reftype is null or reftype='3' or reftype='2') and
(defaultshowname like '%费%' or defaultshowname like '%额%'
or defaultshowname like '%金%' or defaultshowname like '%价%')
----------------------------------------------------------------------------
--参照的表和字段
select pk_refcolumn, fieldname, fieldshowname, ishiddenfield, isblurfield, ismnecode, 
ispkfield, iscolumnshow, islocateshow, columnshowindex, locateshowindex,
bd_refcolumn.pk_reftable,datatype,tablename from 
bd_refcolumn inner join bd_reftable on bd_refcolumn.pk_reftable = bd_reftable.pk_reftable 
where bd_refcolumn.pk_reftable = '0001AA1000000000P4LA'  order by columnshowindex 
--查询有节点权限的人员
-----------------------------------------------------------------------------
select * from sm_funcregister
select user_name from sm_user where cuserid in(
select userid from sm_appuserpower where funid='0001AA10000000000UDO'
)
--查询有节点权限的用户组
select g.group_name,g.pk_corp from sm_group g where cgroupid in(
select groupid from sm_usergrouppower where funid='0001AA10000000000WKR'
)
--审批流相关表
----------------------------------------------------------------------------
select * from pub_wf_instance where billid='' and billno=''
select * from pub_wf_task where pk_wf_instance=''
select * from pub_wf_actinstance where pk_wf_instance=''
select * from pub_workflownote where billid='' and billno=''
select * from pub_wf_actinstancesrc where target_actinstance=pub_wf_actinstance.pk_wf_actinstance
--由于各表外键约束,自行调节删除顺序
 
分享到:
评论

相关推荐

    U8常用SQL.sql

    用友U8常用sql 表描述 ,支持查询所有基础资料和单据模板表和字段。便于日常问题的排查。

    金蝶K3CLOUD 常用SQL

    金蝶K3CLOUD 常用SQL 金蝶K3CLOUD 是一个基于云计算的企业管理软件,提供了一个完整的企业资源规划(ERP)解决方案。以下是金蝶K3CLOUD 中常用的SQL语句,涵盖了物料管理、组织管理、元数据管理、部门管理、单据...

    ORACLE常用SQL语句大全.pdf

    Oracle 常用 SQL 语句大全 本文档总结了 Oracle 中常用的 SQL 语句,包括数据库的创建、删除、备份、表的创建、删除、修改、索引的创建、视图的创建等基本操作,以及一些高级查询运算符的使用。 一、数据库操作 ...

    EXCEL 常用SQL语句解释+VBA 完全手册

    学习"EXCEL 常用SQL语句解释+VBA 完全手册"的内容,不仅可以提升你在Excel中的数据处理能力,还能够使你在面对复杂数据挑战时游刃有余。无论你是数据分析师、项目经理还是企业决策者,掌握这些技能都将大大提高你的...

    oracle常用sql.rar

    "oracle常用sql.rar"这个压缩包文件显然包含了关于Oracle数据库中常用SQL语句的集合,这对于学习和工作中解决常见问题非常有帮助。以下是一些Oracle SQL的重要知识点: 1. **锁表查询**: 在Oracle中,锁定数据是...

    dba常用sql多年长期总结

    ### DBA常用SQL总结 #### 一、DBA的基本职责与技能要求 作为一个数据库管理员(DBA),除了具备一定的技术背景之外,还需要深入了解业务流程以及业务对于数据库的具体操作需求。这意味着DBA不仅要能够确保数据库...

    oracle常用sql整理

    本文将基于"oracle常用sql整理"的主题,深入探讨Oracle SQL的一些核心概念、语句及其实用技巧,适合初级到中级水平的学习者。 一、SQL基础 SQL是标准化的查询语言,分为DDL(Data Definition Language)、DML(Data...

    达梦数据库常用sql.sql

    达梦数据库常用sql.sql

    oracle常用SQL语句(汇总版).docx

    Oracle 常用 SQL 语句汇总 Oracle 是一个功能强大且复杂的关系数据库管理系统,它提供了多种 SQL 语句来管理和操作数据库。在本文中,我们将详细介绍 Oracle 中常用的 SQL 语句,包括数据控制语句(DML)、数据定义...

    Mysql常用SQL语句

    MySQL常用SQL语句 MySQL是一种关系型数据库管理系统,使用SQL(Structured Query Language)语言来管理和操作数据库。下面是MySQL中一些常用的SQL语句: 创建、删除和基本查询 * 显示数据库:`show databases;` *...

    易飞9.0常用SQL.sql

    易飞9.0常用SQL.sql

    常用sqlserver知识讲解

    ### 常用SQL Server知识讲解 #### 一、系统数据类型详解 SQL Server提供了丰富的数据类型以满足不同场景下的需求。以下是对SQL Server中几种常用数据类型的详细介绍: ##### 1. 整数数据类型 整数数据类型是SQL ...

    50个常用SQL语句.zip

    50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用SQL语句.zip50个常用...

    oracle管理常用sql脚本

    以上只是Oracle管理中常用SQL脚本的一部分,实际使用中还需要结合具体场景和需求进行调整和扩展。通过熟练掌握这些脚本,你可以更加有效地管理和优化Oracle数据库,提升系统性能,确保数据的安全性和可靠性。

    Oracle数据库常用sql语句的分类和常用函数.docx

    根据提供的文档信息,本文将详细解析Oracle数据库中的关键SQL语句分类、常用SQL语句以及Oracle函数的应用场景。此外,还将简要介绍Oracle数据库的一些基本管理命令,如启动与关闭服务、用户管理等。 ### 一、Oracle...

    常用sql指令一般面试都可通过

    SQL常用指令详解 SQL 是结构化查询语言(Structured Query Language),是一种专门用于管理关系数据库管理系统(RDBMS)的语言。 SQL 指令是数据库管理系统的基础,掌握 SQL 指令是开发者和数据库管理员必备的技能...

    oracle常用sql语句大全 注释完整 放心使用

    本资料集包含了Oracle数据库中常用SQL语句的大全,注释完整,非常适合初学者和有经验的开发者参考使用。 1. **数据查询(SELECT语句)**: - `SELECT * FROM table_name;`:查询表table_name中的所有列。 - `...

    sqlserver常用sql

    死锁的诊断和定位 查询阻塞的语句 查询执行较慢的语句 查询正在执行的语句1 查询正在执行的语句2 查询所有表的主键 查询所有索引 查询表结构 ...修改SQLServer最大内存 用DAC连接到SQL Server 其它SQL DBCC

    《数据库开发常用SQL文件批量备份》---备份

    《数据库开发常用SQL文件批量备份》---备份 《数据库开发常用SQL文件批量备份》---备份 《数据库开发常用SQL文件批量备份》---备份 《数据库开发常用SQL文件批量备份》---备份 《数据库开发常用SQL文件批量备份》---...

Global site tag (gtag.js) - Google Analytics