This will create the table for us. We can see that there are three fields in the table. One is id which is an auto increment and will take one unique number each time one record is added to the table. Next field is name of 50 length, this will store the student name. Next is class field of 10 length.
CREATE TABLE student ( id int(2) NOT NULL auto_increment, name varchar(50) NOT NULL default '', class varchar(10) NOT NULL default '', mark int(3) NOT NULL default '0', UNIQUE KEY id (id) ) TYPE=MyISAM;
This SQL code will insert six records to the student table. Now our table with data is ready. We will start learning one SQL command now .
INSERT INTO student VALUES (1, 'John Deo', 'Four', 75); INSERT INTO student VALUES (2, 'Max Ruin', 'Three', 85); INSERT INTO student VALUES (3, 'Arnold', 'Three', 55); INSERT INTO student VALUES (4, 'Krish Star', 'Four', 60); INSERT INTO student VALUES (5, 'John Mike', 'Four', 60); INSERT INTO student VALUES (6, 'Alex John', 'Five', 55);
|What is diferrence among SQL,MySQL and Oracle. I wanna Know that..!|
|these are different database servers made by different companies.|
|I like what this site gives to the public!|
|Need a step by step guide to the selection query and the rest of the most common queries and how to build put them all together|
|i have just one word for this tutorial "awesome".|