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 / 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 |
What is the use of concat() in mysql?
using primary can we relate two table, with out foreign key?
Can you tell the difference between ereg_replace() and eregi_replace()?
What is data node in mysql cluster?
What is a string in mysql?
What is datadir?
What is view? How can you create and drop view in mysql?
How to store values to array from mysql database in php?
How many ways we can retrieve the date in result set of mysql using php?
How do I start mysql client?
What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?
How do I edit a stored procedure in mysql?