有二张表h和hh
h表数据如下:
a
12.03
110.21hh表数据如下:
b
12.01
12.03
112.32
用
select h.a from h,hh where h.a=hh.b
结果
/*
12.03
*/
如果把hh的b字段数据类型改成money那怎么查询?
h表数据如下:
a
12.03
110.21hh表数据如下:
b
12.01
12.03
112.32
用
select h.a from h,hh where h.a=hh.b
结果
/*
12.03
*/
如果把hh的b字段数据类型改成money那怎么查询?
解决方案 »
- 怎么能通来一个函数或者其他办法把值显示成对应的编号
- 有没有这样一种sql的解决方案数据库表的int型no, 可设为一个dentity Seed为100000,Identity Increment为1
- 问个问题
- Sql server2008安装问题
- 在线求救,写一个类似交叉结果集的sql (最好结果集能保存在一个table中或者以视图的样式存储)
- 关于存储过程的问题
- ●○●不能在firehose下启动事物!!!!高手急救!!!
- 怎样获取执行SQL语句的错误号?
- 回答一个经常回答别人问题的人提出的问题!
- 报表查询
- 求各位高手看一下这条SQL语句语法哪儿错啦?谢谢!!
- 一个tags多条件匹配查询的问题
create table h(a float)
insert h
select 12.03 union all
select 110.21create table hh(b money)
insert hh
select 12.01 union all
select 12.03 union all
select 112.32
select h.a from h,hh where h.a=hh.bdrop table h
drop table hha
-----------------------------------------------------
12.029999999999999
a numeric(10,2))gocreate table #hh(
b money,
)
goinsert into #h
select 12.03
union all
select 110.21go
insert into #hh
select 12.01
union all
select 12.03
union all
select 112.32select #h.a from #h,#hh where #h.a=#hh.bdrop table #hh
drop table #h
------------------------
我的感觉是一样的呀!没有什么区别呀!
--------------------------------------
要不你用convert()转换一下.