1. Create table table name (name char), sex enum (' Male ', ' female '),..... );2. View all tables in the database show tables from database name; 3. View column information in the table show colunms from table name; /desc table name; 4. Add a
6. Use Exists,not exists clauses reasonably. As shown below:
1.SELECT SUM (T1. C1) from the T1 where (SELECT COUNT (*) from T2 where t2.c2=t1.c2>0) 2.SELECT SUM (T1. C1) from T1where EXISTS (SELECT * from T2 WHERE T2. C2=t1. C2) both
Classification of data typesNumeric (integer, fractional), character, date, decimals divided into fixed-point and floating-point numbers.First, the integral typeNote: ① If unsigned is not set, the default is signed, and if set to unsigned, the
An Action folder (library)1. IncreaseCreate Database db1 charset UTF8;2. By deletingDrop database db1;3. ChangeALTER DATABASE DB1 CharSet GBK;4. Check# View the database you are currently creating show CREATE Database db1;# view all databases show
MYSL transactions (InnoDB support transactions) use transactions in the MySQL console to operate mysql> begin; # start a transaction mysql> insert into a (a) values (555);mysql>rollback; rollback , This data is not written, of course, if the
(1) Base operation of the library
View existing libraries: show databases;
Create library (set default character Set): Ccreate database name default Charset=utf8;
View the statement that created the library: show create database
1, from the library only to open the Log-bin function, do not add log-slave-updates parameters, the data from the library copied from the main library will not be written to the Log-bin log file.2. When writing data directly from the library, it is
1. How does MySQL implement non-interactive queries?Mysql-h 172.16.136.9-p6515-u user-ppasswd db_name-e ' select * from game_flow_balance where ActivityID = "YWyY1oi2" an D (status = "2" or status = "4"); 'Note:-E non-interactive single quotation
Oracle has been used before, and for tree queries you can use the start with ... connect bySelect * from with id='130000'by= Prior parent_id;Yes, that's what Oracle supports.Now the company is using MySQL, for this query method can only be
A: Explann implementation plan detailed1), the number of ID columns, the higher the first execution, if the number is the same size, then proceed from the top down, the ID column is NULL for the table is this is a result set, do not need to use it
DownloadMySQL8.0 for Windows Zip package: https://dev.mysql.com/downloads/file/?id=476233.After entering the page can not login, click on the bottom "No thanks, just start my download." To start the download.Or you can download it directly:
Day content:Components in 1.bootstrap2.bootstrap Plug-in1. First clear the timer with the timer2. First stop () with animation3.mysql Installation and useSocket Service SideHoldHow to save a user name and passwordDbUser.txtID username pwd1alex
First, the simulation of the deletion of data table Recovery 12 binary logging feature enabledVim/etc/my.cnf[mysqld]log-bin2 Full backupMysqldump-a-F--master-data=2--single-transaction |gzip >/data/all.sql.gz3 Modifying data tablesInsert students
If you are connecting to MySQL with a similar error of ' Host ' win-s ' ip0ab0uc68 is not allowed to connect to this MySQL server, try using the following solution:Programme one:进入mysql,执行以下语句(‘root‘是用户名,‘123456‘是密码)use mysql;grant all privileges on
Index from table_nameCREATE INDEX: CREATE INDEX on table_name (COLUMN_NAME) creates a unique index: creationUnique index on table_name (COLUMN_NAME) Creating a federated Index:Createindex on table_name (COLUMN1_NAME,COLUMN2_NAME)Delete index:drop
MySQL Account management
Before we logged in to MySQL we were all directly using the root user, the root user belongs to the Super Administrator in the database system, and has the right to do whatever you want to do with MySQL.
If you
Create foreign key mysql> create table ' Study_record ' ( -> ' ID ' int (one) NOT NULL, -> ' Day ' int not NULL, -> ' status ' char (+) NOT NULL, -> ' stu_id ' int (one) not null, - > PRIMARY KEY (' id '),
When the root user password for MySQL is forgotten, it can be reset by following these steps (executed under the CMD window of Administrator privileges)1. Turn off the startup MySQL servicenet stop MySQL2. Perform the following command to avoid
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