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.

Recommended Answers

All 3 Replies

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

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.