Ask Your Question
0

How to add a new field to an existing database?

asked 2017-07-21 11:29:07 +0200

chorcher gravatar image

How to define a new field in an existing database?

For example, if an existing database contains the fields "firstname" and "lastname" how can I add (define) a new field such as "middlename"?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-07-21 11:53:27 +0200

librebel gravatar image

updated 2017-07-21 11:56:06 +0200

Hello @chorcher,

new fields can be added to an existing table by executing an SQL command such as:

ALTER TABLE "Table name" ADD "middlename" VARCHAR(127)

where "Table name" is the name of your existing table and 127 is the number of characters allowed for the Middle Name.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-07-21 11:29:07 +0200

Seen: 123 times

Last updated: Jul 21 '17