C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
4
Reply
How to add a new column to an existing table?
Sapna Malik
14y
4.7k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
Alter Table Tablename Add columnname datatype
Sanjeev Kumar
9y
0
alter table table_name add column_name data_type
Rahul Prajapat
10y
0
SQL:
ALTER TABLE emp ADD DateOfBirth date
To insert the new column after a specific column, such as name, use this statement:
MySQl:
ALTER TABLE abc ADD empname VARCHAR(60) AFTER deptname;
If you want the new column to be first, use this statement:
ALTER TABLE abc ADD empname VARCHAR(60) FIRST;
Renaming a table
ALTER TABLE abc RENAME TO xyz
Jiteendra Sampathirao
14y
0
SQL> Alter table table_name (id number, name varchar2(20));
Sapna Malik
14y
0
What is mirrored on-line Redo Log?
What is data block in Oracle?
Message