I would like to create the table, then insert at the same time, how can I do that with sql?
Printable View
I would like to create the table, then insert at the same time, how can I do that with sql?
Sigh!
More information please such as which database server are you using?
Do you want to execute multiple sql strings or stored procedure?
Are you using VB6 or VBA or .NET?
There is a SQL statement called Select ... Into which is known as a "make-table" query.
You can do it by Removing the eels from your hovercraft. It's amazing the trouble those little buggers can cause.
It will be .net and it will be the sql server one single database.
Bascially, I allow users to create a "table" in my db, after the table is created, they will have ability to create columns too... I don' tknow how to approach this.
You mean you want to give the user the ability to create and modify any table they want?
OK
Create Table blah (
ColumnName DataType Nullable,
.............
)
Exeute on a command object
Alter Table blah .......
I will say I find this a very strange request. How will you be able to use the table and columns added if the app knows nothing about them.