|
| ||||||||||
| Tags: database, insert, mysql, oracle, select, sql server, where clause |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| insert into select statement for database
I have created a table and insert a lot of records as the name of students of my college.The table is created with address age and blah columns.The Address field is much big.The problem is that I need to create another table which requires the same information to feed.Should I insert the whole record again in the second or any thing else.If you have any idea about the tools or commands Then suggest me . thanks. |
|
#2
| ||||
| ||||
| insert into select statement for database
Hello friend ! You have created a table but in which database you didn't specified.You have created another table that need the same information to insert. There is no any tool and anything required to send your data from one table to another table .Commonly,In every database the insert into select statement is used to transfer the records from one table to another. Before inserting the same records in second table,The datatypes and columns should be same as first table.Then after you can execute the query to insert the records in second table with appropriate arguments.
__________________ Grand Theft Auto 4 PC Video Game |
|
#3
| ||||
| ||||
| insert into select statement for database
The already created table named Colg_record has some columns named Name varchar(25) Age number(5) Address varchar(120) Create another table named tab_dup but should be same data type.After creating the table tab_dup,you can execute the following query statement to perform the insert operation for second table. Code: insert into tab_dup(name,age,address) select * from colg_record;
__________________ The FIFA Manager 2009 PC Game |
|
#4
| ||||
| ||||
| Combine Multiple Tables into One in PHP
You can combine multiple tables in one table in MySQL database to use the insert into select statement . Suppose, when you require to combine a number of tables into one. you need just certain fields and columns from each of the table and then would adjust them together into a newly created table. Code: INSERT INTO Par_tab1 SELECT tab1.col1, tab1.col3, tab2.col2, tab2.col6 FROM tab1, tab2 |
|
#5
| ||||
| ||||
| CREATE TABLE with SELECT statement in database
The SELECT statement can also be used create the table.Using the select statement,you can create another table which would be the clone of the back created table.It is commonly used to generate the reports from existing tables or performing the mixture. The below expanded statement can be used to create another table using SELECT statement.The code would be as follows - Code: CREATE TABLE bbb SELECT col1, col2 FROM aaa; |
|
#6
| ||||
| ||||
| insert into select statement for database
The capability of the insert into select statement has increased according to the version evolutions.Not only MySQL,there are so many databases which uses this statement grown their capability of MySQL statement. You can investigate it from the official websites of the databases using the documentation articles written by experts of database. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "insert into select statement for database" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connection and Statement objects in database connectivity | VAIJAYI | Software Development | 5 | 28-12-2010 09:05 PM |
| Store procedure with 10 select statement.how to create datatable in dotnet? | itechsasi | Software Development | 1 | 16-08-2010 02:03 PM |
| How to insert artificial data into a select statement? | MAHAH | Software Development | 5 | 12-03-2010 08:03 PM |
| Case statement in oracle database | Kingfisher | Software Development | 4 | 04-03-2010 09:21 PM |
| Use the CASE Statement in a SQL SELECT Clause | Abraham.J | Software Development | 3 | 12-08-2009 01:52 PM |