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

Explain what is mysql?

1080


Why do we use group by and order by function in mysql?

965


How to install mysql?

1065


What does mysql flush hosts do?

954


Is oracle better than mysql?

940


What is foreign key in mysql?

1095


Can we write procedure in mysql?

985


How do you backup a database in mysql?

1120


how to dump all databases for backup. Backup file is sql commands to recreate all db's.

993


How to get help information from the server?

1111


What is innodb mysql?

1160


What is pdo in php mysql?

990


Which command is used to view the content of the table in mysql?

966


What is the difference between truncate and delete?

1269


What command is used to delete the data from the table without deleting the table structure?

1039