Create tables in a mysql database hosted at Locaweb

Asked

Viewed 191 times

0

I need to add a table to my database. How do I add a table to this database hosted in Ocaweb? You must have some software or I can upload some file?

  • 5

    create table nome_da_tabela ?

  • You are doubtful in the script to create the table or how to connect to access the script execution?

  • But I should put my sql file ready and go up to the server or make a new file?

  • i don’t know how to create the table, since I already use the database.

  • 1

    So it’s good to start here: https://dev.mysql.com/doc/

1 answer

3

You must enter the cPanel of the domain in question, click on the phpMyAdmin icon and in the top menu bar click on the SQL tab. Will open a text area where you type the command to add a table.

Following this model:

CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
column_name3 data_type(size),
....
);

An example:

CREATE TABLE MyGuests (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
firstname VARCHAR(30) NOT NULL,
lastname VARCHAR(30) NOT NULL,
email VARCHAR(50),
reg_date TIMESTAMP
)
  • I’ll try here. Thank you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.