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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the functions in mysql?

896


What is a data directory?

884


How do I delete a row in mysql?

900


How we can see all indexes defined for a table in mysql?

887


How can you make a database as your current database?

967


How we can get distinct columns values in mysql?

1021


What ascii 31?

906


What is strict mode in mysql?

852


How to enable or disable a row of a table using MySQL in struts?

4043


What is the default port for MySQL Server?

1017


What is pragma exception?

915


I've looked but can't find a MySQL equivalent for MS SQL's xp_cmdshell. I have 7z files that I want to unzip and load into MySQL. I'm trying to write a sp to do the unzip, but I can't find a way to do that. Can anyone provide an example of a similar process in Windows? TIA.

3894


How does limit work in mysql?

862


What is 'mysqldump'?

1007


What are date and time data types?

941