Posted by: baskardba | May 13, 2010

What I Learned New Today

Concatenating a new value to the existing values in a table
SQL> create table baskar(name varchar2(50),sal number(35));

Table created.

SQL> insert into baskar values (‘bas,kar,sun,ben’,1000);

1 row created.

SQL> commit;

Commit complete.

SQL> select * from baskar;

NAME                                                      SAL
————————————————– ———-
bas,kar,sun,ben                                          1000

Now i need to append a name ‘RAM’ to the existing name  without changing or updating  the entire value which can be done by

SQL> update baskar set name=name||’,ram’;

1 row updated.

SQL> commit;

Commit complete.

SQL> select * from baskar;

NAME                                                      SAL
————————————————– ———-
bas,kar,sun,ben,ram                                      1000

Happy learning.

baskar.l

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: