0

Hi to all,
i created following table in SQL.
===================================

create table employee(name varchar(20), dob date)

===================================

But, when i ran the query, i got the massage that 'SQL can not find data type 'date''.
How should i include 'date' in to table definition.

3
Contributors
3
Replies
5
Views
6 Years
Discussion Span
Last Post by d5e5
0

Hi to all,
i created following table in SQL.
===================================

create table employee(name varchar(20), dob date)

===================================

But, when i ran the query, i got the massage that 'SQL can not find data type 'date''.
How should i include 'date' in to table definition.

You have a number of options. DATETIME, DATE, TIMESTAMP etc. Depending on what format you want to store your dates as. See here for definitions: http://dev.mysql.com/doc/refman/5.0/en/datetime.html

0

Hi to all,
i created following table in SQL.
===================================

create table employee(name varchar(20), dob date)

===================================

But, when i ran the query, i got the massage that 'SQL can not find data type 'date''.
How should i include 'date' in to table definition.

create table employee(name varchar(20), dob date) should have worked OK in MySQL. What database software were you using when you got that error?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.