随笔分类 -  SQL

SQL、T-SQL、PL/SQL代码收藏备忘
摘要:字符串转数字、数字转时间戳、时间戳转日期字符串: select t.id,t.license_no,t.pass_port_name1,t.data_source1,to_char(to_timestamp(to_number(t.pass_tim1)/1000),'yyyy-MM-dd HH24: 阅读全文
posted @ 2022-01-11 10:43 0611163 阅读(62) 评论(0) 推荐(0)
摘要:SQL: select * from PT_ORG_INFO START WITH id='102' CONNECT BY PRIOR id=par_id 连表递归查询SQL: select info.* from PT_CAMERA_INFO info join (select * from PT 阅读全文
posted @ 2017-07-26 12:04 0611163 阅读(315) 评论(0) 推荐(0)
摘要:只导某些表: 阅读全文
posted @ 2016-04-27 11:09 0611163 阅读(366) 评论(0) 推荐(0)
摘要:代码: 阅读全文
posted @ 2016-04-27 10:45 0611163 阅读(678) 评论(0) 推荐(0)
摘要:代码:/// /// 分类检索 查询selectname/// public static DataTable GetSelectName_FLJS(string thing_type_id, string men_id, string gang_id, string mu_id, string k... 阅读全文
posted @ 2014-10-13 14:53 0611163 阅读(1866) 评论(0) 推荐(0)
摘要:select distinct stu.*,dbo.GetClassNameByStudentCode(stu.Code) as ClassName,dbo.GetCourseNameByStudentCode(stu.Code) as CourseName,dbo.GetLinkmanByStud... 阅读全文
posted @ 2014-05-23 22:59 0611163 阅读(1692) 评论(0) 推荐(0)
摘要:USE [FM_Dev]GO/****** 对象: UserDefinedFunction [dbo].[GetClassNameByStudentCode] 脚本日期: 05/23/2014 17:20:43 ******/SET ANSI_NULLS ONGOSET QUOTED_IDE... 阅读全文
posted @ 2014-05-23 22:49 0611163 阅读(1250) 评论(0) 推荐(0)