how insert selected column only ?
Answers were Sorted based on User's Feedback
Answer / rajkumar
Format
------
Inser into <tablename> (column name) select (column name)
from <tablename> where <Condition>
Example
--------
INSERT INTO emp (empname) SELECT empname from employe WHERE
empid=5
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / srinivas
insert into <table_name> ( <col1> ,<col3>) values ( val1,val2)
| Is This Answer Correct ? | 1 Yes | 0 No |
how to get rank of diffrent student in same table based on newly inserted row in sql server2008
What are the elements of dbms?
What does it mean to manipulate data?
Where the sql logs gets stored?
How to execute the cursor queries with "open" statements?
How can we remove orphan records from a table?
Can I run multiple instances of sql server 2000 at the same time on one computer?
What is resource governor in sql server?
What is difference between cte and view?
What is default constraint?
you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration
Hi Friends, I have a table in which there are thousands of records and in city field there is NULL value for all records now i want to change that null value with distinct values in each record say delhi, bihar, agra, jaipur etc, what will be the query for that????? its not possible to update thousands of records one by one. is there any alternative ...? Plz help ... its urgent Thanx in advance
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)