1.SQL语句In的用法 select字段A from表where字段AIn (值1,值2,值3,值4......) //拿出数据库中字段A的所有的值 到指定的 值1,值2,值3,值4......数据中查找,返回找到的值 select字段A from表where字段A not In (值1,值2,值...
分类:
其他好文 时间:
2014-06-28 16:33:02
阅读次数:
224
本文转载自:http://hi.baidu.com/ajyajyajy/item/4e2a7f4dc83393d2c1a592c1use DBNAMEgoselect * from sysobjects where xtype='U'; --这是查询所有表的信息select count(*) fro...
分类:
数据库 时间:
2014-06-28 15:47:24
阅读次数:
226
今天小伙伴问了一个sql的问题: update t set status=2 where id in(select id from t where status=1)这个sql,在并发的情况下,会不会有问题?假设:下面的讨论,数据库的事务隔离级别是read_committed其实这个可以很容易测试....
分类:
数据库 时间:
2014-06-28 15:46:39
阅读次数:
204
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.Follow up:Can you solve it without using extra space?一次...
分类:
其他好文 时间:
2014-06-28 13:38:14
阅读次数:
171
Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possibl...
分类:
其他好文 时间:
2014-06-28 12:40:47
阅读次数:
219
判断数据库if exists(select 1 from sys.databases where name=N'[数据库名]')判断表if exists (select 1 from dbo.sysobjects where id = object_id(N'[dbo].[表名]') and obj...
分类:
数据库 时间:
2014-06-28 12:39:23
阅读次数:
251
查询表中有多少列select count(1) from user_tab_columns where table_name=upper('M_ReturnPicture')//查询数据中某个用户所创建的表数量SELECT table_name FROM all_tables WHERE owner...
分类:
数据库 时间:
2014-06-24 10:55:01
阅读次数:
274
1 判断数据库是否存在if exists (select * from sys.databases where name = '数据库名')drop database [数据库名]2 判断表是否存在if exists (select * from sysobjects where id = obje...
分类:
数据库 时间:
2014-06-24 10:20:17
阅读次数:
248
String sql=null;1、sql="update 表名 set = [where=]"2、sql="delete from 表名 [where=]"3、sql="insert into 表名 [column_list] values(date_values) [where=]"4、sql=...
分类:
数据库 时间:
2014-06-23 08:17:50
阅读次数:
258
public class ConvertHelper where T : new() { private static string module = "ConvertHelper.cs"; public static ObservableCollection Co...
分类:
其他好文 时间:
2014-06-23 06:51:54
阅读次数:
318