码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
sql语句练习
使用的是scott用户下的emp 和dept表进行操作--(1) 查询20部门的所有员工信息。select * from emp where deptno=20;--(2) 查询所有工种为CLERK的员工的员工号、员工名和部门号。(注意大小写)select empno,ename,deptno fr...
分类:数据库   时间:2014-07-11 23:30:03    阅读次数:421
结息步骤
delete from fl where yy = 2014 and mm = 6 and bz 5;delete from cpzqsp where cllx > '70';delete from cpzgbh where status < '31';delete from cpdwbh wh.....
分类:其他好文   时间:2014-07-11 22:56:27    阅读次数:249
SQL中if exists用法细节
用if exists建表【转】1 判断数据库是否存在 Sql代码if exists (select * from sys.databases where name = ’数据库名’) drop database [数据库名] if exists (select * from sys.database...
分类:数据库   时间:2014-07-11 22:55:51    阅读次数:267
Sql从一张表中更改另一张表数据
语法:update table1 set table1.列=table2.列 from table2 where table2.列=table1.列update NFYSP.dbo.PATIENTsetPATIENT_ADDUSERID=OLD.PATIENT_ADDUSERID,PATIENT_U...
分类:数据库   时间:2014-07-11 21:28:57    阅读次数:311
oracle DBLink
现有两个oracle DB为A和B,为了能在A数据库中对B数据库进行操作,我们需要在A数据库中建立对B的DBLink。 在创建DBLink之前,我们首先去检查下DB A的global_names的值(select name,value from v$parameter where name ='g....
分类:数据库   时间:2014-07-11 19:43:49    阅读次数:218
sql3
select count(1) from (select distinct a.ID from chatonline a, chatonlinelog b where a.ID = b.chatonlineID) t
分类:数据库   时间:2014-07-11 11:25:46    阅读次数:232
SEH
When SEH is used there is a registration process where an exception structure is created for every function as a local variable. The last field of the...
分类:其他好文   时间:2014-07-11 10:52:10    阅读次数:734
Mysql一些复杂的语句
1.查找重复的行SELECT * FROM blog_user_relation a WHERE (a.account_instance_id,a.follow_account_instance_id) IN (SELECT account_instance_id,follow_account_in...
分类:数据库   时间:2014-07-11 10:46:13    阅读次数:228
SQL语句中的Having子句与where子句
一。介绍 聚合函数如SUM, COUNT, MAX, AVG等。这些函数和其它函数的根本区别就是它们一般作用在多条记录上。而通过使用GROUP BY子句,可以让SUM 和 COUNT 这些函数对属于一组的数据起作用。当你指定 GROUP BY region 时,只有属于同一个region的一组...
分类:数据库   时间:2014-07-09 15:13:19    阅读次数:217
mysql 删除重复数据的sql语句
CREATE TABLE tmp AS SELECT id FROM get_review_url WHERE (no,title,name,content) IN (SELECT no,title,name,content FROM get_review_url GROUP BY no,title,name,content HAVING COUNT(*) > 1) AND id NOT I...
分类:数据库   时间:2014-07-09 11:46:16    阅读次数:197
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!