![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MSSQL+MySQL+Oracle
kinmet2010
有较强的文字功底,文笔流畅,善于信息搜索与编辑整理 自学能力比较强,喜欢接受新事物,勇于探索 吃苦耐劳,待人真诚,有很强的团队合作 责任心强, 协调沟通能力较好,能积极面对压力及挑战 做事认真,细心,有耐心。
展开
-
数据库随机查询表中的n条记录
Oracle: select * from (select * from tableName order by dbms_random.value) where rownum MS SQLServer: select top N * from tableName order by newid()My SQL: select * from tableName order by rand() limit N转载 2010-10-05 18:20:00 · 513 阅读 · 0 评论 -
SQL语句妙用
<br />精妙的SQL语句<br /> <br />· 说明:复制表(只复制结构,源表名:a 新表名:b) <br />select * into b from a where 1<>1<br />· 说明:拷贝表(拷贝数据,源表名:a 目标表名:b)<br />insert into b(a, b, c) select d,e,f from b;<br />· 说明:显示文章、提交人和最后回复时间<br />select a.title,a.username,b转载 2010-10-10 22:31:00 · 575 阅读 · 0 评论 -
数据库的基本知识
1 给已经创建的表添加一列 ALTER TABLE tablename ADD columnname 数据类型 null, 如:alter table bs_stockother add fgroupid numeric null2 修改一列的数据类型 alter table 表 alter column 字段名 字段类型 如:alter table bs_stockother alter fgroupid numeric null原创 2010-10-21 14:39:00 · 583 阅读 · 0 评论 -
数据库存储过程基础
1.创建简单的存储过程create proc proc_name as select * from syscolumns where object_name(id)='crm_customer';2执行存储过程exec proc_name3删除存储过程drop proc proc_name原创 2010-11-02 22:23:00 · 421 阅读 · 0 评论 -
mysql CONCAT和DATE_ADD函数的使用
/** 1.上一期+1个月和当前期不相等,同时排除还款日是当月的最后1天 2.还有待还款的数据 */ SELECT CONCAT(‘update t_loan_repayment_history set predict_repayment_date = \”,DATE_ADD((SELECT predict_repayment_date FROM t_loan_repayment_h原创 2018-01-30 12:48:52 · 914 阅读 · 0 评论