Skip to content

Instantly share code, notes, and snippets.

@GreyHat147
Created November 18, 2018 01:43
Show Gist options
  • Save GreyHat147/2fd83ec7e9db8d9fcd3272e38bb8d031 to your computer and use it in GitHub Desktop.
Save GreyHat147/2fd83ec7e9db8d9fcd3272e38bb8d031 to your computer and use it in GitHub Desktop.
query shop
city varchar(30),
address varchar(30),
email varchar(100)
);
CREATE TABLE publishments (
id_publish int primary key auto_increment,
vehicle_type char(1),
brand varchar(20),
model varchar(20),
type varchar(10),
status char(1),
price double(10, 8),
accesories varchar(200),
city varchar(20),
thumbnail varchar(500),
id_user int,
foreign key (id_user) references users(id_user)
);
INSERT INTO users values (1, "khal", "123456789", "Carlos", "Rojas", "CC", 1545454545, 54544545, "Bogotá", "AV CALI", "carlos@gmail.com");
INSERT INTO publishments values (1, 'C', "BMW", "ABC", "TEST", 'N', 60.00000, "Radio", "Bogotá", "http://static.carroya.com/vehiculos/1793233/1793233_1_w.jpg", 1);
ALTER TABLE publishments add column name varchar(30) after id_publish;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment