How to create this Mysql Database [closed]

-2

I have no idea of MySQL and I have an image of what I need, I would like some help or some tutorial to follow.

What I'm doing is calling from Xcode images located on a server, but this type of organization is what I need, more exactly how to enter that URL in that field, what kind of field should be INT , VARCHAR or which of all. A thousand thanks.

    
asked by Gonch 02.02.2016 в 06:41
source

1 answer

1

It seems that the field " id " is a int and " name " is a text or a varchar (whose size will depend on the maximum size you want to leave for the URL).

For example, you could create a similar table by making id primary key and auto-increment, and limiting name to a maximum of 255 characters, and the code would look like this:

CREATE TABLE IF NOT EXISTS 'images' (
  'id' int(11) NOT NULL AUTO_INCREMENT,
  'name' varchar(255) NOT NULL,
  PRIMARY KEY ('id')
);
    
answered by 02.02.2016 / 06:52
source