|
-
Jul 17th, 2009, 12:55 PM
#1
Thread Starter
Frenzied Member
create and insert same time
I would like to create the table, then insert at the same time, how can I do that with sql?
-
Jul 17th, 2009, 01:06 PM
#2
Re: create and insert same time
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.
-
Jul 17th, 2009, 01:18 PM
#3
Re: create and insert same time
You can do it by Removing the eels from your hovercraft. It's amazing the trouble those little buggers can cause.
-
Jul 17th, 2009, 02:41 PM
#4
Thread Starter
Frenzied Member
Re: create and insert same time
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.
-
Jul 17th, 2009, 02:50 PM
#5
Re: create and insert same time
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.
Sometimes the Programmer
Sometimes the DBA
Mazz1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|