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
Is mysql a nosql database?
How to print message in mysql trigger?
What is the difference between a heap table and temporary table?
What is meant by sharding?
What is mysqli procedural?
What is pragma autonomous_transaction?
What are the technical features of MySQL?
How many tables we can create in mysql database?
What is cursor in mysql?
Can we store images in mysql database?
What is the difference between truncate and delete?
How to make a column bigger and delete unique from table.
What is the difference between mysql_fetch_array() and ysql_fetch_object() ?
how to connect a php script with the mysql database?
List the different types of normalization?