检索最后一列的值 [英] retreiving last column value

查看:75
本文介绍了检索最后一列的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为sql获取最后插入的图像并将其绑定到图像控件中?

how to retreive the last inserted image for the sql & bind it in image control?

推荐答案

使用SELECT SCOPE_IDENTITY();获取最后插入的行的主键在您的图像表中.

您可以检索此ID,然后基于该ID进行映像,也可以创建存储过程并根据此ID返回图像.

试试吧!
Use SELECT SCOPE_IDENTITY(); to get the primary key of last inserted row in your image table.

You can either retrieve this ID and then image based on it or create a Stored Procedure and return image based on this ID.

Try out!


这篇关于检索最后一列的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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