Latest Tutorials| Questions and Answers|Ask Questions?|Site Map

Home Answers Viewqa SQL Database

Have Programming Question? Ask it here!

1 Answer(s)      3 years and 5 months ago
Posted in : SQL

in my database i insert the first name and last name as('abc','def')but it gives error.plz send me the query how can we insert the first name,last name,email id,bate of birth,and mobile number.

View Answers

April 14, 2011 at 11:33 AM

Here is the query:

insert into student(firstname,lastname,email,dob,phone) values('Roseindia','Technologies','','2011-04-14',1111);

For the above code,we have created a table named 'student':

CREATE TABLE `student` (                                 
           `id` bigint(20) NOT NULL auto_increment,               
           `firstname` varchar(100) default NULL,                 
           `lastname` varchar(100) default NULL,                  
           `email` varchar(100) default NULL,                     
           `phone` int(20) default NULL,                          
           `dob` date default NULL,                               
            PRIMARY KEY  (`id`)                           

Related Tutorials/Questions & Answers: