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

How do I start and stop mysql on windows?

722


What do you need to connect php to mysql?

745


Explain what is mysql?

835


What is the default password for mysql?

699


What are Heap tables?

1198


What is difference between mysql and mysql server?

733


What is the maximum number of columns per table?

715


How to get a list of indexes of an existing table?

758


What is mysql in dbms?

728


What data type is money?

654


How to create a new view in mysql?

741


How to Set a root password if there is on root password.

816


How can I create a database in mysql?

690


How do I clear the command in mysql?

730


What is sql vs mysql?

772