Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to add more columns to a table in mysql


        
            
        
CREATE TABLE IF NOT EXISTS vendors (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
Comment

alter table add multiple columns mysql

CREATE TABLE IF NOT EXISTS vendors (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255)
);
ALTER TABLE vendors
ADD COLUMN phone VARCHAR(15) AFTER name;
Comment

how to add multiple column in mysql

ALTER TABLE table_name
  ADD new_column_name column_definition
    [ FIRST | AFTER column_name ],
  ADD new_column_name column_definition
    [ FIRST | AFTER column_name ],
  ...
;
Comment

PREVIOUS NEXT
Code Example
Sql :: time in sql server 
Sql :: inser into example 
Sql :: get last record deluge 
Sql :: fetlife 
Sql :: intersect sql 
Sql :: how to check common records in 2 table 
Sql :: how to limited number of rows in db2 select * from imglib FETCH FIRST 20 ROWS ONLY 
Sql :: subquery in mysql 
Sql :: mysqli_free_result 
Sql :: postgres between dates 
Sql :: mariadb search columns 
Sql :: how to login to mysql in homestead 
Sql :: Host ' is not allowed to connect to this MySQL server 
Sql :: oracle INTERVAL DAY to second to number 
Sql :: convert sql server guid to varbinary 
Sql :: create table if not exists 
Sql :: sql select where id not exists in another table 
Sql :: mysql shell 
Sql :: List MySQL Table and Index Size 
Sql :: copy data from one database to another 
Sql :: mariadb cast null to 0 
Sql :: how to fetch data from database without last column 
Sql :: can you put a break command in sql 
Sql :: mysql trim characters 
Sql :: postgresql connect 
Sql :: Write an SQL query to determine the 5th highest salary without using TOP or limit method. 
Sql :: mysql trigger to delete old data 
Sql :: psql view databases 
Sql :: one to many sql 
Sql :: how to exit mysql terminal 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =