Start MySQL (create table) 2

Source: Internet
Author: User
Drop   Table   If   Exists T_user;
Create   Table T_user (
ID Int   Primary   Key Auto_increment,
U_uid Varchar ( 50 ),
U_pwd Varchar ( 20 ),
U_name Varchar ( 20 )
);
/* Insert into t_user values ('admin', '123456', 'administrator 1 '); */
Insert   Into T_user (u_uid, u_pwd, u_name) Values ( ' Admin ' , ' 123 ' , ' Administrator 1 ' );
Insert   Into T_user (u_uid, u_pwd, u_name) Values ( ' Bb ' , ' 123 ' , ' Administrator 2 ' );
Insert   Into T_user (u_uid, u_pwd, u_name) Values ( ' Bb ' , ' 123 ' , ' Administrator 2 ' );
Update T_user Set U_name = ' Administrator bbb ' Where ID = 1 ;
Delete   From T_user Where ID = 3 ;
Select   *   From T_user;

Note: To enable auto-increment columns, you must specify other column names.

 Insert into t_user values ('admin', '123456', 'administrator 1 ')

In this case, the addition fails.

Comments --CodeHowever, a space must be added to the backend. Otherwise, an error may be returned /**/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.