如何使用vb.net在数据库中创建新表 [英] how create new table in database using vb.net

查看:516
本文介绍了如何使用vb.net在数据库中创建新表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用vb.net在sql数据库中创建新表
表格名称为"EM"和
第一列名称为"no",类型为"integer"
第二列是名称,类型是文本"
pls lps帮助我... plss

i need create new table in sql database using vb.net
table name is "EM" and
1st Column name is "no" and type is "integer"
2nd column is name and type is "text"
pls lps help me guyss... plss

推荐答案


您可以像选择/插入/更新数据库中的数据那样从代码中运行命令对象创建表语句

sqlcommand.commandtext =创建表EM(no int,text varchar);"

sqlcommand.executenonquery()
you can run create table statement by command object from your code as you do to select/insert/update data in database

sqlcommand.commandtext="create table EM(no int,text varchar);"

sqlcommand.executenonquery()


这篇关于如何使用vb.net在数据库中创建新表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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