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?
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.
Re: How can I add the locations to the existing members
this can be done by simply updating the table
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;
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.
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.
Re: How can I add the locations to the existing members
you can insert the column into the existing table through the following syntax
[B][U]alter table <tablename> add <attributeName> datatype;[/U][/B]
by this column only get inserted into ur table.to enter values into the value you have to use update command
[B][U]update <tablename>set <attributeNamr>=<attribute value>
where <primary Key>=<key value of arow in which you want to enter attribute value>;[/U][/B]
for further references about queries refer dbms book author name is raghuramakrishnan,
bye,takecare................................
Re: How can I add the locations to the existing members
you can insert the column into the existing table through the following syntax
[SIZE="6"]alter table <tablename> add <attributeName> datatype[/SIZE][/SIZE];
by this column only get inserted into ur table.to enter values into the value you have to use update command
[SIZE="6"]update <tablename>set <attributeNamr>=<attribute value>
where <primary Key>=<key value of arow in which you want to enter attribute value>;[/SIZE]for further references about queries refer dbms book author name is raghuramakrishnan,
bye,takecare................................
Re: How can I add the locations to the existing members
you can insert the column into the existing table through the following syntax
[SIZE="6"]alter table tablename add attributeName datatype[/SIZE][/SIZE];
by this column only get inserted into ur table.to enter values into the value you have to use update command
[SIZE="6"]update tablename set attributeName = attribute value
where primary Key = key value of arow in which you want to enter attribute value;[/SIZE]for further references about queries refer dbms book author name is raghuramakrishnan,
bye,takecare................................