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
What is a storage engine? What are the differences between innodb and myisam engines?
What is data directory in mysql?
How to copy data from one server to another using php?
What is the datatype for password in mysql?
What is the use of mysqli_fetch_assoc?
How to filter data from a mysql database table with php?
How do I set user privileges in mysql?
How to get data from mysql in php?
What is dirty read and phantom read?
How do I install mysql on windows 10?
What is a left join mysql?
How do I get a list of table names in mysql?
What is mysql connection limit?
How to rename an existing table in mysql?
What is mysql default port number?