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

  • SEARCH
  • Home
  • 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 8301179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:50:55+00:00 2026-06-08T16:50:55+00:00

If i have my SQL create statement as follows; CREATE TABLE TABLENAME12 ( TAB_ID

  • 0

If i have my SQL create statement as follows;

CREATE TABLE TABLENAME12
(
  TAB_ID INT NOT NULL AUTO_INCREMENT,
  NAME_FIRST NVARCHAR(200),
  TYPE NVARCHAR(200),
  PRIMARY KEY( TAB_ID )
);

and if i want to Insert values to it, should i enter TAB_ID too ? Since it’s auto increment.

When i INSERT INTO SWM_SALES_FEEDBACK VALUES (1,'Jerry','ty'); It gets inserted if i don’t specify the primary key INSERT INTO SWM_SALES_FEEDBACK VALUES ('Jerry','ty'); i get the following error :

ERROR 1136 (21S01): Column count doesn't match value count at row 1

1.) What is the point of having AUTO_INCREMENT if it doesn’t get auto incremented.
2.) If i have a field called:

BIRTH_TIME DATE,

How should i INSERT value to this field since it’s DATE type

  • 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-06-08T16:50:57+00:00Added an answer on June 8, 2026 at 4:50 pm

    Point 1

    If you don’t want to store all fields in DB then you have to specify those column names before VALUES clause as shown below.

    INSERT INTO myTable (field2,field3) VALUES ('field2','field3')
    

    In your case, statement should be

    INSERT INTO SWM_SALES_FEEDBACK (name_first, type) VALUES ('Jerry','ty')
                                   ^^^^^^^^^^^^^^^^^^
    

    Point 2

    If you have field as DATETIME, TIMESTAMP as datatype, you can enter date as

    INSERT INTO myTable (myDate) VALUES ('2012-12-28 12:12:12')
    

    Format is yyyy-mm-dd hh:mm:ss

    If you want to store the current time of the system in DB, you could use NOW() as shown below.

    INSERT INTO myTable (myDate) VALUES (NOW())
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this sql statement: CREATE TABLE [dbo].[User]( [UserId] [int] IDENTITY(1,1) NOT NULL, [FirstName]
I have two SQL statements: CREATE TABLE legs(legid INT PRIMARY KEY AUTO_INCREMENT NOT NULL,
I have a sql server table: CREATE TABLE [Workflow].[MilestoneDate]( [MilestoneDateId] [int] IDENTITY(1,1) NOT NULL,
I have the following sql create statement mysql> CREATE TABLE IF NOT EXISTS `erp`.`je_menus`
Say i have the following table: create table T ( ID int not null
I have an SQL table defined as below: CREATE TABLE [TestComposite] ( ID int,
I have an SQL CREATE PROCEDURE statement that runs perfectly in my local SQL
I have a table defined by the following SQL: CREATE TABLE test ( id
I have an SQL table written in MSSQL: create table [action] ( action_id bigint
I have a sql function that does a simple sql select statement: CREATE OR

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.