SQL with table

From HelloWiki

Jump to: navigation, search

create table hello_table (hello_column varchar(12));
insert into hello_table (hello_column) values ('Hello World!');
select * from hello_table;

[edit] Details

create table hello_table (hello_column varchar(12));

This line creates a table in the database. Name of the table is hello_table, it contains only one column (name is hello_column) which can contain strings with a maximum size of 12 characters.

insert into hello_table (hello_column) values ('Hello World!');

It inserts a row into the hello_table table. In this row the hello_column column will be 'Hello World!'.

select * from hello_table;

It selects (and prints) every row (and every column) from the hello_table, but this table contains only one row with 'Hello World!' string.

[edit] See also in HelloWiki

SQL

Personal tools