SQL判断字段类型
-->Title:Generating test data
-->Author:wufeng4552
-->Date :2009-09-25 09:56:07
if object_id('tb')is not null drop table tb
go
create table tb(ID int,name text)
insert tb select 1,'test'
go
--方法1
select sql_variant_property(ID,'BaseType') from tb
--方法2
select object_name(ID)表名,
c.name 字段名,
t.name 数据类型,
c.prec 长度
from syscolumns c
inner join systypes t
on c.xusertype=t.xusertype
where objectproperty(id,'IsUserTable')=1 and id=object_id('tb')
相关文档:
==============================================
第1讲
在线观看: http://www.boobooke.com/v/bbk1389
视频下载: http://www.boobooke.com/v/bbk1389.zip
第2讲
在线观看: http://www.boobooke.com/v/bbk1390
视频下载: http://www.boobooke.com/v/bbk1390.zip
第3讲
在线观看: http ......
==============================================
第01讲: Chapter 00--Oracle 11g SQL Fundamentals Training Introduction
在线观看: http://www.boobooke.com/v/bbk2003
视频下载: http://www.boobooke.com/v/bbk2003.zip
第02讲: Chapter 00--Oracle 11g SQL Fundamentals Training Introduction ......
String keyword = request.getParameter("keyword");
String timeRange = request.getParameter("timeRange");
String type = request.getParameter("type");
StringBuffer sql = new StringBuffer();
sql.append("use webstation_leadall s ......
一、 简单查询
简单的Transact-SQL查询只包括选择列表、from子句和WHERE子句。它们分别说明所查询列、查询的表或视图、以及搜索条件等。
例如,下面的语句查询testtable表中姓名为“张三”的nickname字段和email字段。
SELECT nickname,email
from testtable
WHERE name='张三'
......
原文:刘武| 常用的ORACLE PL/SQL管理命令一
熟悉ORACLE管理的一定对这些命令不会陌生,不过对于我这个刚接触ORACLE管理的来说,还是有必要做下记录,以便随时查看。
一 登录SQLPLUS
sqlplus 用户名/密码@数据库实例 as 登录角色;
如:用户sys(密码为123)以sysdba的角色登录数据库ORACL,我们可以输入:sqlplus sy ......