How do I create a table in an existent database SQL VB2017

manny cash

New member
Joined
Oct 19, 2024
Messages
1
Programming Experience
Beginner
I already made a SQL database programmatically and want to create a table programmatically, too (code) but, I do not know how can I start up. I was looking on the web unfortunately I did not find any sign. If somebody know how I will appreciate in advance your help. Thank you so much.
 
You do it by executing the appropriate SQL against the database. If you want to execute SQL that is not a query against a SQL Server database, you create a SqlCommand and call ExecuteNonQuery. It doesn't matter if it's a CREATE TABLE statement (DDL: Data Definition Language) or an INSERT, UPDATE or DELETE statement (DML: Data Manipulation Language). It's SQL and it's not a query so that's how it's done. As for what SQL to execute, as always, start with the relevant documentation. That and many other relevant web pages can be found with the obvious web search.
 

Latest posts

Back
Top