#if exists If a result set exists, the IF is the where condition if true executesDROP TABLE IF EXISTS itcast_class;#创建表格CREATE TABLE Itcast_class (class_id INT PRIMARY KEY auto_increment,Class_name VARCHAR (Ten) not NULL DEFAULT ' ') CHARACTER SET
On the Internet to check some of the MySQL coding related information, here to tidy up, the wrong place to welcome you to criticize. 1. mysql character set-related variables:-Character_set_server: Default internal operation character
Note: Each command in MySQL is followed by a semicolon;1. Display Databasemysql> show databases;+----------+| Database |+----------+| MySQL || Test |+----------+2 rows in Set (0.04 sec)MySQL has just finished installing a database of two databases:
Since it is the first time to install, it is not possible to determine whether you have installed the build and MySQL to rely on the plug-in, use I was as your most original installation environment.1, install the mysql5.1 dependency packageYum
1000-line MySQL learning notes/* Start MySQL */net start MySQL/* Connect and disconnect the server */Mysql-h Address-P Port-u user name-p password/* Skip Permission verification login MySQL */Mysqld --skip-grant-tables--Change root passwordPassword
Storage of MySQL data on disk:Data BLOCK:A block of multiple disk blocks in which the storage engine manages data blocks.A disk is a block device, and the data stored on disk is stored in blocks.When MySQL reads the table into memory, it is also
SQL model (SQL mode):Restrict user behavior by defining certain rules, and define the corresponding processing mechanism.Common models:AnsiRelaxed mode, check the inserted data, if not conform to the definition type or length, the data type
MySQL variables:Server variables:Use parameters to change the MySQL run feature. The directive that is defined in the configuration file.To view server variables:mysql>show [GLOBAL] [SESSION] VARIABLES [like ' STRING '];mysql> SELECT @@ global|
OrderRecently has been busy projects, various overtime, project on-line, gradually did not have the time to study. This is not, just these days to spare some time, sneak in, is reading a database of books, I believe many small partners have also
For mysql/hive to be counted, you can use a function if you want rows to become columns.Case field A When value B then C [if D then e]* [ELSE F] ENDWhen the field a= value B, return C (if the field is the value of the field, it can be a fixed value
Mysql After the server loses power, it discovers that the site link database failed, after viewing the data set status[Email protected]~]# service mysqld StatusMysqldis stopped[Email protected]dbserver1~]# chkconfig--list mysqldMysqld 0:off 1:off
Create a tableFirst log in to MySQL, such asMysql-uroot-ppasswordOpen a database, such asMysql>use DB1;Create a parent table that we name as province, such asMysql> CREATE table province (ID smallint auto_increment key, name varchar () not
1. Remember to build a Web site, database, development environment, Web services a brain all on a machine, with a few m of large pictures do webpage background, feel very cool. There is no database optimization problem without access.2. In MySQL,
There is a SQL in the business code that queries the student's name:Select Stu_name from Stu_info where stu_id between Id_1 and Id_2;Estimate at that time trance, splicing sql simultaneous wrong result id_1 > id_2, cause always query not to student
1. install the MySQL driver. http://dev.mysql.com/downloads/connector/odbc/,650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/D9/wKioL1WreVThInkKAAFqZeGLTUg371.jpg "title=" 1.png " alt= "Wkiol1wrevthinkkaafqzegltug371.jpg"/>According to
Database encoding table encoding IDE encoding must be consistent, can solve the problemScenario: Import this data into the database and get the first letter of the city name PinyinImport data from Excel to MySQL, using the JXL libraryThe PINYIN4
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