Hi,
Here is the syntax...
mysql> create database xxx;
mysql>use xxx;
mysql>create table table1 ( Roll integer NOT NULL UNIQUE,Name varchar(10),Mark integer) ;
Here 'Roll' column should not be null and it should be unique (Primary key)
( If null value '\N' is inserted for 'Roll' then 0 (or '' for varchar field) will be substituted automatically. However there is a configuration which could avoid this and report an error...
See:
http://dev.mysql.com/doc/mysql/en/constraint_NOT_NULL.html
)
mysql>insert into table1 values
(1,'Ram',90),(2,'Rigue',91),(3,'NickRoper',95),(4,'Jens',91);
mysql>select * from table1;
(shows the whole table)
mysql> desc table1
( shows table structure )
mysql> alter table table1 ADD(Rank integer) ;
(Alters the table structure)Adds a new column to the existing table
Search for other syntax here in this forum or online manual
Hope this helps ...
Regards,
Ram.