Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


when i declare date data type in sql ,i inserted the date
22-10-2012,but my result is in different date 1894-07-11 any
one pls help me what's wrong in my query
Create table orders(od_id int,od_name varchar(10),od_date
date)
insert into orders values(1,'sai',22-10-2012) and any one
pls suggest what i can learn for 3 years real time
experenice in sql because i am looking for database field



when i declare date data type in sql ,i inserted the date 22-10-2012,but my result is in different..

Answer / lakshmi

The default date format in sql is 'yyyy-mm-dd' but in the query that is in dd-mm-yyyy and without single quotes. Below is the insert query.

insert into orders values(1,'sai','2012-10-22');

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More MySQL Interview Questions

What are the difference between now and current_date in mysql?

1 Answers  


How to control the max size of a heap table?

0 Answers  


write a c++ program to add a user to mysql.the user should be permitted to only "insert" into the given database

3 Answers   Infosys, Webyog,


How to upload a large file through phpmyadmin in mysql?

0 Answers  


How to write query to select word java's from column employees and from emp table

1 Answers   CGI,


What does schema mean?

0 Answers  


What is delimiter in mysql trigger?

0 Answers  


How to insert dynamic values in mysql using php?

0 Answers  


What is the function of myisamchk?

0 Answers  


How would you enter characters as hex numbers?

0 Answers  


How we can get the current date in mysql?

0 Answers  


How to change a password for an existing user via mysqladmin?

0 Answers  


Categories