|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
sql insert into question
i'm new with sql so this must be easy. I want to insert data from a column of a table into another table, both with column name student_id. Basically this can be achieved by:
Code:
INSERT INTO dbo.student_results (student_id) SELECT student_id FROM dbo.students_profile but i need to add another constant value to the table dbo.student_results, in the column test_id. how can this be done? |
|
#2
|
||||
|
||||
|
Is this what you are looking for (sorry its a bit late):
insert into dbo.student_results select student_id, 'constant value' from dbo.students_profile |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > sql insert into question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|