1 2 3 4 5 6 > >>   Sort: Date

How To Concatenate Two Character Strings
How To Concatenate Two Character Strings? - MySQL FAQs - Introduction to SQL Basics If you want concatenate multiple character strings into one, you need to use the CONCAT() function. Here are some good examples: SELECT CONCAT('Welcome',' to') FROM DUAL; Welcome to SELECT CONCAT('FYI','center','.com...
2007-05-11, 10109👍, 0💬

How To Enter Binary Numbers in SQL Statements
How To Enter Binary Numbers in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want to enter character strings or numeric values as binary numbers, you can quote binary numbers with single quotes and a prefix of (B), or just prefix binary numbers with (0b). Binary numbers will be au...
2007-05-11, 9219👍, 0💬

How To Enter Numeric Values as HEX Numbers
How To Enter Numeric Values as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics If you want to enter numeric values as HEX numbers, you can quote HEX numbers with single quotes and a prefix of (X), or just prefix HEX numbers with (0x). A HEX number string will be automatically converted into a...
2007-05-11, 8530👍, 0💬

How To Enter Boolean Values in SQL Statements
How To Enter Boolean Values in SQL Statements? - MySQL FAQs - Introduction to SQL Basics If you want to enter Boolean values in SQL statements, you use (TRUE), (FALSE), (true), or (false). Here are some good examples: SELECT TRUE, true, FALSE, false FROM DUAL; +------+------+-------+------- +| TRUE ...
2007-05-11, 8270👍, 0💬

How To Decrement Dates by 1
How To Decrement Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a date, and you want to decrement it by 1 day, you can use the DATE_SUB(date, INTERVAL 1 DAY) function. You can also use the date interval subtraction operation as "date - INTERVAL 1 DAY". The tutorial...
2007-05-11, 8219👍, 0💬

How To Enter Microseconds in SQL Statements
How To Enter Microseconds in SQL Statements? - MySQL FAQs - Introduction to SQL Date and Time Handling If you want to enter microseconds in a SQL statements, you can enter them right after the time string as a 6-digit number delimited with '.'. '0' will be padded to right if not enough digits. Here ...
2007-05-11, 7788👍, 0💬

How To Calculate Expressions with SQL Statements
How To Calculate Expressions with SQL Statements? - MySQL FAQs - Introduction to SQL Basics There is no special SQL statements to calculate expressions. But you can use the "SELECT expression FROM DUAL" statement return the calculated value of an expression. "DUAL" is a dummy table in the server. Th...
2016-11-09, 6884👍, 1💬

💬 2016-11-09 lux: good

How To Divide Query Output into Groups
How To Divide Query Output into Groups? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY You can divide query output into multiple groups with the GROUP BY clause. It allows you specify a column as the grouping criteria, so that rows with the same value in that column will be considered as a...
2007-05-11, 6683👍, 0💬

How To Use mysqlbinlog to View Binary Logs
How To Use mysqlbinlog to View Binary Logs? - MySQL FAQs - Server Daemon mysqld Administration If you have binary logs turned on, you can use "mysqlbinlog" to view the binary log files. The tutorial exercise below shows you how to view two binary files together: >cd \mysql\bin >mysql -u root -pretne...
2007-05-11, 6663👍, 0💬

How To Use Subqueries with the IN Operator
How To Use Subqueries with the IN Operator? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries A subquery can be used with the IN operator as "expression IN (subquery)". The subquery should return a single column with one or more rows to form a list of values to be used by the IN operatio...
2007-05-11, 6656👍, 0💬

Values of Auto Incremented Columns
Assuming that the structure of a table shows two columns like this: --------+------------+------+- ----+--------+---------------Field | Type | Null | Key | Default| Extra --------+------------+------+- ----+--------+---------------user_id | int(15) | | PRI | NULL | auto_increment email | varchar(80)...
2006-09-01, 6538👍, 0💬

How To Escape Special Characters in SQL statements
How To Escape Special Characters in SQL statements? - MySQL FAQs - Introduction to SQL Basics There are a number of special characters that needs to be escaped (protected), if you want to include them in a character string. Here are some basic character escaping rules: The escape character (\) needs...
2007-05-11, 6523👍, 0💬

How To Return Top 5 Rows
How To Return Top 5 Rows? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If you want the query to return only the first 5 rows, you can use the LIMIT clause, which takes one parameter as the maximum number of rows to return. The following statement returns the first 5 rows from the fy...
2007-05-11, 6502👍, 0💬

How To Change the Password of Another User Account
How To Change the Password of Another User Account? - MySQL FAQs - Managing User Accounts and Access Privileges If you want to change the password of someone else's user account, you can connect to the server as "root" and use the "SET PASSWORD FOR userName ..." command to change the password of ano...
2007-05-10, 6451👍, 0💬

How To Get the Last ID Assigned by MySQL
How To Get the Last ID Assigned by MySQL? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If you use an ID column with AUTO_INCREMENT attribute, you can use the mysql_insert_id() function to get the last ID value assigned by the MySQL server, as shown in the sample script below: ...
2007-05-11, 6404👍, 0💬

What Happens to Your Transactions When ERROR 1213 Occurred
What Happens to Your Transactions When ERROR 1213 Occurred? - MySQL FAQs - Transaction Management: Commit or Rollback If your transaction receives the "Deadlock found when trying to get lock" - ERROR 1213, MySQL server automatically terminates your transaction and rolls back your data changes of the...
2007-05-11, 6310👍, 0💬

How To Run "mysql" Commands from a Batch File
How To Run "mysql" Commands from a Batch File? - MySQL FAQs - Command-Line End User Interface mysql If you have group of "mysql" commands that need to be executed repeatedly, you can put them into a file, and run them from the file in "mysql" batch mode. Here is a batch file, \temp\links.sql, contai...
2007-05-10, 6304👍, 0💬

How To Build WHERE Criteria with Web Form Search Fields
How To Build WHERE Criteria with Web Form Search Fields? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts If your PHP script is linked to a Web form which takes search key words for multiple data fields. For example, your Web form asks your visitor to search for Website links with...
2007-05-11, 6252👍, 0💬

How To Use Subqueries in the FROM clause
How To Use Subqueries in the FROM clause? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If you have a query returning many rows of data, and you want to perform another query on those rows, you can put the first query as a subquery in the FROM clause of the second query. A subquery u...
2007-05-11, 6202👍, 0💬

How To Enter Characters as HEX Numbers
How To Enter Characters as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics If you want to enter characters as HEX numbers, you can quote HEX numbers with single quotes and a prefix of (X), or just prefix HEX numbers with (0x). A HEX number string will be automatically converted into a charact...
2007-05-11, 6136👍, 0💬

How To Give a User Read-Only Access to a Database
How To Give a User Read-Only Access to a Database? - MySQL FAQs - Managing User Accounts and Access Privileges If you want give a user read-only access to a database, you can grant to him/her only the "SELECT" privilege, so that he/she can not run any DDL statements, and any INSERT, UPDATE, or DELET...
2007-05-08, 6134👍, 0💬

How To Analyze Tables with "mysqlcheck"
How To Analyze Tables with "mysqlcheck"? - MySQL FAQs - Administrator Tools for Managing MySQL Server If you want analyze tables with "mysqlcheck", you need to use the "--analyze" option. The following tutorial exercise shows you how to analyze all tables in "mysql" database: >cd \mysql\bin >mysqlch...
2007-05-11, 6071👍, 0💬

How To Increment Dates by 1
How To Increment Dates by 1? - MySQL FAQs - Introduction to SQL Date and Time Handling If you have a date, and you want to increment it by 1 day, you can use the DATE_ADD(date, INTERVAL 1 DAY) function. You can also use the date interval add operation as "date + INTERVAL 1 DAY". The tutorial exercis...
2007-05-11, 6031👍, 0💬

How To Display a Past Time in Days, Hours and Minutes
How To Display a Past Time in Days, Hours and Minutes? - MySQL FAQs - Managing Tables and Running Queries with PHP Scripts You have seen a lots of Websites are displaying past times in days, hours and minutes. If you want to do this yourself, you can use the TIMEDIFF() SQL function. Note that the TI...
2007-05-11, 5997👍, 0💬

1 2 3 4 5 6 > >>   Sort: Date