减去记录中的字段 [英] Subtract a field in a record

查看:73
本文介绍了减去记录中的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计

i想要减去记录字段中的值

i有一个表名为TableLogin的表有2个字段:1.ID 2.Login

默认登录字段为4我希望每次用户登录然后登录字段减去一个

i意味着这个(登录-1)



我尝试过:



i尝试此代码

hey guys
i want to subtract a value in a field of the record
i have a table that name TableLogin that has 2 field : 1.ID 2.Login
default Login field is 4 i want to every time user login then login field subtract by one
i mean this (Login-1)

What I have tried:

i tried this code

Update Login set Login-1 where ID=2



但它不工作,我收到错误

我怎么能减去(1)从登录字段


but its not working and i get the error
how can i subtract (1) from the login field

推荐答案

尝试:
UPDATE TableLogin SET Login=Login-1 WHERE ID=2


这篇关于减去记录中的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆