求类似sqlserver中isnull()函数在access中如何实现
isnull(a,b)
即如过字段a为null则返回b
eg:
select isNUll(a,b) from table_1;
直接 IFNULL就行了。
SQL code:
mysql> select ifnull(null,2);
+----------------+
| ifnull(null,2) |
+----------------+
| 2 |
+----------------+
1 row in set (0.01 sec)
mysql> select ifnull(1,2);
+-------------+
| ifnull(1,2) |
+-------------+
| 1 |
+-------------+
1 row in set (0.00 sec)
mysql>
楼上看错了。ACCESS的话,则可以用1楼的或者用 NZ()
select NZ(a,b)
相关问答:
哪里出错了,输出这样的结果??
<%@ Page Language="VB" AutoEventWireup="false" aspcompat="true" CodeFile="Default.aspx.vb" Inherits="_Default" %&g ......
dwr.xml:
<create creator="struts" javascript="PrisonerActionForm">
<param name="formBean" value="prisonerForm"/>
< ......
vc中用odbc的方法访问access数据库,用到了cdatabase类和crecordset类。数据源在窗口初始化的时候被打开g_datasource.Open("data",FALSE,FALSE); 点击一个按钮启动一个定时器,在定时器内完成以下操作,定 ......
$conn = @new COM("ADODB.Connection") or die ("ADO连接失败!");
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("database.mdb");
$conn-&g ......