Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6714593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:30:49+00:00 2026-05-26T08:30:49+00:00

I want to create a table that has a birthday date, this column shouldn’t

  • 0

I want to create a table that has a birthday date, this column shouldn’t be null, and I want to add a default value to be the date of 1970-01-01, I tried this but it gives an error in mysql console:

create table __update_my_status.__user
(
__user_id          int unsigned   auto_increment,
__email            varchar(100)   collate utf8_bin    not null,
__password         varchar(30)    collate utf8_bin    not null,
__first_name       varchar(50)    collate utf8_bin    not null,
__last_name        varchar(50)    collate utf8_bin    not null,
__date_of_birth    date           default DATE ('1970-01-01'),
__profile_image    blob,
constraint __pk_user_id           primary key (__user_id)
);

the error is: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘(‘1970-01-01′),
__profile_image blob,
constraint __pk_user_id prima’ at line 8

I’m using MySql 5.1.58 on Ubuntu 11.10

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:30:50+00:00Added an answer on May 26, 2026 at 8:30 am

    You don’t need to use the DATE operator in this case. You just add the value as a string and the database handles it automagically.

    __date_of_birth date default '1970-01-01',
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a new column in a MYSQL table that has Fn
I want to create a persisted computed column in a table so that I
I have a table that has two columns, ID and Value. For this example
I would like to create a table that has both a column for created
I want to create a new row in my database on a table that
I have a table create table Profiles (id int, xml_data xml ) that has
I have a table that has rows like this: <tr id= class=objectRow> <td class=bulkSelector><input
I have a table in MySQL that has 3 fields and I want to
I've got a MySQL table that looks like this: CREATE TABLE my_facts ( `id`
I have a table that has date and datasize. When I export the list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.