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 755947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:11:20+00:00 2026-05-14T15:11:20+00:00

A table is: mysql> desc gifts; +—————+————-+——+—–+———+—————-+ | Field | Type | Null |

  • 0

A table is:

mysql> desc gifts;
+---------------+-------------+------+-----+---------+----------------+
| Field         | Type        | Null | Key | Default | Extra          |
+---------------+-------------+------+-----+---------+----------------+
| giftID        | int(11)     | NO   | PRI | NULL    | auto_increment |
| name          | varchar(80) | YES  |     | NULL    |                |
| filename      | varchar(80) | YES  |     | NULL    |                |
| effectiveTime | datetime    | YES  |     | NULL    |                |
+---------------+-------------+------+-----+---------+----------------+

the following is ok:

mysql> insert into gifts
    -> values (10, "heart", "heart_shape.jpg", now());
Query OK, 1 row affected (0.05 sec)

but is there a way to not specify the “10”… and just let each one be 11, 12, 13… ?

I can do it using

mysql> insert into gifts (name, filename, effectiveTime)
    -> values ("coffee", "coffee123.jpg", now());
Query OK, 1 row affected (0.00 sec)

but the column names need to be all specified. Is there a way that they don’t have to be specified and the auto increment of primary key still works? thanks.

  • 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-14T15:11:21+00:00Added an answer on May 14, 2026 at 3:11 pm
    values (NULL, "heart", "heart_shape.jpg", now());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a mysql table with the follwoing fields : id, desc, value, people,
I have a MySQL table (table1) with following fields... id, title, description, detail, category,
I have a MySQL table of names , which consists of two fields: name
This is my current MySQL table. entry_id entry_uid entry_title ------------------------------------------- 1 1 Testing title
I have this code for print a multi columns table from mysql $k=<table width='100%'
hi i created a simple php/mysql/Ajax chat application and I have a few questions.
I am attempting to alphabetically organize an options list populated from an array; the
I want to increase the speed of some database queries I am running on
I want build a query to return a list of project IDs for the
I've created a form to update the banner info on my website. Everything seems

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.