Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa SQL SQL Alter Table
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
SQL Alter Table
1 Answer(s)      4 years ago
Posted in : SQL


What is alter table statement in sql? Can u please show me an example of SQL Alter Table??

Thanks!


Advertisement
View Answers

December 27, 2010 at 12:14 AM


ALTER TABLE Statement: It allows to rename the existing table. Apart from it... the statement can also be used to modifiy, add or deleate a column in the existing table.

SQL Alter Table Query Syntax:

- Rename Table: 

ALTER TABLE suppliers
 RENAME TO vendors;

- Add Column
ALTER TABLE supplier
ADD (   supplier_name   varchar2(50),
    city    varchar2(45) );

- Modifiy Column
ALTER TABLE supplier
MODIFY (    supplier_name   varchar2(100)   not null,
    city    varchar2(75)        );

- Drop Column
ALTER TABLE supplier
 DROP COLUMN supplier_name;


Related Tutorials/Questions & Answers:
SQL Alter Table
SQL Alter Table  What is alter table statement in sql? Can u please show me an example of SQL Alter Table?? Thanks!   ALTER TABLE... also be used to modifiy, add or deleate a column in the existing table. SQL
SQL Alter Table Name
SQL Alter Table Name       SQL Alter Table Name is used to change or modify  name of the existing table. To understand how to change the name of created table in SQL
Advertisements
SQL Alter Table Primary Key
SQL Alter Table Primary Key       Alter a Table Primary Key in SQL modifies the existing table and adds a primary key. Create Table Stu_Table SQL statement to create
SQL Alter Table Name
SQL Alter Table Name       SQL Alter Table Name is used to change or modify  name of the existing table. To understand how to change the name of created table in SQL
SQL Alter Table Syntax
SQL Alter Table Syntax       SQL Alter Table Syntax modifies the existing table definition... Alter Table Syntax. The list of Syntax performs the following operations
SQL Alter Table
SQL Alter Table       SQL Alter Table is used to modify the existing table definition... 'SQL Alter Table'. To understand and grasp the example we create a table 'Stu
SQL Alter Table Add Multiple Columns
SQL Alter Table Add Multiple Columns       Alter Table Add Multiple Columns in SQL... Multiple Columns Query The Alter Table Query in SQL modifies
SQL Alter Table Primary Key tutorial
SQL Alter Table Primary Key       Alter a Table Primary Key in SQL modifies the existing table and adds a primary key. Create Table Stu_Table SQL statement to create
SQL Alter Table Add Multiple Columns
SQL Alter Table Add Multiple Columns       Alter Table Add Multiple Columns in SQL... Multiple Columns Query The Alter Table Query in SQL modifies
SQL Alter Column
SQL Alter Column       SQL Alter Column modifies the existing table and add a column. Understand with Example The Tutorial illustrate an example from 'SQL Alter
SQL Alter Column Name
example on SQL Alter Column Name. In this Example, create a table 'Stu_Table... SQL Alter Column Name       Alter Column Name in SQL is used to change or modify the name of column
SQL Alter Column Syntax
SQL Alter Column Syntax       SQL Alter Column Syntax modifies the existing table definition. Understand with Example The Tutorial illustrate an example from SQL Alter Column Syntax
SQL Alter Column
; SQL Alter Column modifies the existing table and add a column. Understand... SQL ALTER Syntax The SQL ALTER Syntax is used to modify the table... SQL ALTER Query The given below Query alter a table
SQL Alter Column Name
SQL Alter Column Name       Alter Column Name in SQL is used to change or modify the name... a simple example on SQL Alter Column Name. In this Example, create
SQL Alter Column Default Value
SQL Alter Column Default Value       Alter Column Default Value in  SQL Server is used... statement. The insert into in SQL Query add the records to table
How alter table in MySQL?
How alter table in MySQL?  Hi, I have a table and I want to alter an int field into text field. How to alter the table in MySQL? Thanks   Hi, You can use the following query: alter table employees change empid empid
SQL Alter View
of an SQL statement. A virtual table contains rows and columns, as same as real table. In SQL Alter View is used to modify a previous created view... SQL Alter View      
JDBC: Alter Table Example
new field -  sql= " ALTER TABLE student ADD location varchar(30)" You can delete the unused field- sql="ALTER TABLE student DROP... also alter the field definition. sql="ALTER TABLE student ALTER 
SQL Alter Column Default Value
SQL Alter Column Default Value       Alter Column Default Value in  SQL Server... Query The Alter Table Keywords modify table'Stu_Table' and MODIFY
mysql alter table add column
mysql alter table add column  Hi, What is the syntax of mysql alter table add column? Thanks   Hi, Here is mysql alter table add column example: ALTER TABLE employee ADD address VARCHAR(50); Read more at MySQL Add
alter table create index mysql
alter table create index mysql  Hi, What is the query for altering table and adding index on a table field? Thanks   Hi, Query is: ALTER TABLE account ADD INDEX (accounttype); Thanks
alter table create index mysql
alter table create index mysql  Hi, What is the query for altering table and adding index on a table field? Thanks
Mysql Alter Table
Mysql Alter Table       Mysql Alter Table is used to redefine the existing table. Understand with Example The Tutorial illustrate an example from 'Mysql Alter Table'. To grasp
Mysql Alter Table Syntax
Mysql Alter Table Syntax       Mysql Alter Table is used to redefine the existing table. ALTER TABLE tbl_name ADD [COLUMN] col_name column_definition
SQL Alter Column type
SQL Alter Column type       Alter Column type in SQL is used to change or recreate the data type... the simplest and easiest example, which helps you to understand SQL Alter Column
SQL Alter Database
SQL Alter Database       SQL Alter Database is used to modify the structure of existing database. Understand with Example The Tutorial illustrate an example from 'SQL Alter Database
Mysql Alter Rename Table
Mysql Alter Rename Table       Mysql Alter Rename Table is used to modify and change the name... 'Mysql Alter Rename Table'. To grasp this example , we create a table employees
Mysql Alter Rename Table
Mysql Alter Rename Table       Mysql Alter Rename Table is used to redefine and rename the existing... Alter Rename Table'. To understand this example we create a table 'employees
SQL Alter Column Size
SQL Alter Column Size       Alter Column Size modify the Column Size. The SQL Alter Column Size... with Example The Tutorial brings you an illustrative example from SQL Alter
mysql alter table add unique constraint
mysql alter table add unique constraint  How to add mysql alter table add unique constraint in mysql table. Thanks   Hi Following query query can be used: ALTER TABLE mytable ADD CONSTRAINT uc_key1 UNIQUE
SQL Alter Column type
SQL Alter Column type       Alter Column type in SQL is used to change or recreate the data type... the simplest and easiest example, which helps you to understand SQL Alter Column
 

 

 

DMCA.com