
- Forum
- Databases
- SQL How can I add the locations to the existing members
-
Junior Member
How can I add the locations to the existing members
How can I add a location into a column. I have inserted a colunm in an existing table suppose there was 4 columns in emp table (empno, ename, sal, dept) & have entered the data and and later on I remember that I have forgot to make the collumn LOC. I entered the LOC colunm now the question is this that How can I add the locations to the existing members?
-
Contributing Member
Re: How can I add the locations to the existing members
ya u can do that..................
As u r saying you have inserted new column so for inserting the values in that column u can use following:-
update emp_table set LOC='ABC' where emp_no=123;
make sure that emp_no is unique for every employee.
-
Re: How can I add the locations to the existing members
You need to use the update command with some condition .for that u need some sort of uniqueness in the existing record.
-
Junior Member
Re: How can I add the locations to the existing members
this can be done by simply updating the table
-
Junior Member
Re: How can I add the locations to the existing members
u can add using following commands :
alter table tablename add column datatype(len)[defaule val] constraints;
-
Junior Member
Re: How can I add the locations to the existing members
You can do this by using UPDATE command. Depending on the primary and alternate keys set up for this table, using member number as an index of the table allows for faster inserts.
Last edited by mtiques; 08-20-2007 at 12:51 PM.
-
Junior Member
Re: How can I add the locations to the existing members
You can do this by using UPDATE command. Depending on the primary and alternate keys set up for this table, using member number as an index of the table allows for faster updates.
-
Junior Member
Re: How can I add the locations to the existing members
you can insert the column into the existing table through the following syntax
alter table add datatype;
by this column only get inserted into ur table.to enter values into the value you have to use update command
update set =
where =;
for further references about queries refer dbms book author name is raghuramakrishnan,
bye,takecare................................
-
Junior Member
Re: How can I add the locations to the existing members
you can insert the column into the existing table through the following syntax
alter table add datatype[/SIZE];
by this column only get inserted into ur table.to enter values into the value you have to use update command
update set =
where =;for further references about queries refer dbms book author name is raghuramakrishnan,
bye,takecare................................
-
Junior Member
Re: How can I add the locations to the existing members
you can insert the column into the existing table through the following syntax
alter table tablename add attributeName datatype[/SIZE];
by this column only get inserted into ur table.to enter values into the value you have to use update command
update tablename set attributeName = attribute value
where primary Key = key value of arow in which you want to enter attribute value;for further references about queries refer dbms book author name is raghuramakrishnan,
bye,takecare................................
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