sql语句中的insert语句的用法

[复制链接]
查看11 | 回复3 | 2009-5-17 01:14:08 | 显示全部楼层 |阅读模式
C#写法,其中fields为与textbox对应的字段名,textbox1为textbox的IDstring sql="Insert 表名 fields values " + textbox1.Text;...
回复

使用道具 举报

千问 | 2009-5-17 01:14:08 | 显示全部楼层
SqlCommand userCommand=new SqlCommand();userCommand.text=="instert into 表名 字段名 values ('"textbox.text.toString"');textbox.text 注意转换相应的类型。...
回复

使用道具 举报

千问 | 2009-5-17 01:14:08 | 显示全部楼层
没有区别,insert和insertinto完全一样。但insertinto是sql标准语句,而insert在某些db上可能不受支持。...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行