+ 1
Making New Tables
Hello Fellow Learners :) I would like to know how to create my own tables. I have successfully downloaded and installed XAMMP. To practice what I am learning in the SQL course, I would like to create a table with information about my cats :) I am not sure of the syntax for this task. Also I just wanted to add that I love that there are people learning from all over the world! This is truly a global community and I love being a small part of it.
5 ответов
+ 8
sql 0 bob made a new sql table
_______?--|-.
| | /\
+ 3
I put together a SQL app inside SoloLearn. The sample query may help answer your question:
https://code.sololearn.com/WUg6o4QaxPGU/?ref=app
Since you have your own engine (with cleaner output than I've achieved so far) you can just copy the SQL to your system if you want.
+ 2
I suggest to start with PhpMyAdmin
start the apache server and MySql from Cpanel.
open the Browser and go to localhost/phpMyAdmin
you will be prompted for credentials.
unlass you changed the password for MySql or created accounts, you can log in with user "root" and no password.
Once you are in, the graphical interface makes it easier to create and edit the database/table/data.
once you are familiar with the consequences of your queries you can call them from a php script in your webpage.
+ 1
first go to mysql console and type
create database ................name...............
use ..............name(of database you created);
then create table .........table name.........(first_name varchar(25),last_name varchar(20),age number(3));
it will create simple table that you want
0
CREATE TABLE table_name
(
column_name1 data_type(size),
column_name2 data_type(size),
column_name3 data_type(size),
....
);