<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:311  Sort:Rank

Date and Time Intervals in MySQL
What Are Date and Time Intervals in MySQL? A date and time interval is special value to be used to increment or decrement a date or a time at a given date or time unit. A data and time interval should be expression in the format of "INTERVAL expression unit", where "unit" and "expression" should fol...
2017-12-26, 1549🔥, 0💬

Converting Dates to Character Strings in MySQL
How To Convert Dates to Character Strings in MySQL? You can convert dates to character strings using the DATE_FORMAT(date, format) function. MySQL supports the following basic formatting codes: %a Abbreviated weekday name (Sun..Sat) %b Abbreviated month name (Jan..Dec) %c Month, numeric (0..12) %D D...
2017-12-26, 1406🔥, 0💬

Writing Date and Time Literals in MySQL
How To Write Date and Time Literals in MySQL? MySQL offers a number of formats for you to use to enter date and time literals: ANSI standard format: "YYYY-MM-DD HH:MM:SS". Non-standard limiters. Like: "YYYY/MM/DD HH^MM^SS" or "YYYY.MM.DD HH-MM-SS". No limiters. Like: "YYYYMMDD" for a date or "HHMMSS...
2017-12-26, 1344🔥, 0💬

Converting Character Strings to Dates in MySQL
How To Convert Character Strings to Dates in MySQL? If you have a character string that represents a date, and you want to convert it into a date value, you can use the STR_TO_DATE(string, format) function. STR_TO_DATE() shares the same formatting codes with DATE_FORMAT() function. The tutorial exer...
2017-12-26, 1344🔥, 0💬

Entering Microseconds in SQL Statements in MySQL
How To Enter Microseconds in SQL Statements in MySQL? 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 are some good examples: SELECT TIME('1997/01/31 0...
2017-12-26, 1303🔥, 0💬

Presenting a Past Time in Hours, Minutes and Seconds in MySQL
How To Present a Past Time in Hours, Minutes and Seconds in MySQL? If you want show an article was posted "n hours n minutes and n seconds ago", you can use the TIMEDIFF(NOW(), pastTime) function as shown in the following tutorial exercise: SELECT TIMEDIFF(NOW(), '2006-07-01 04:09:49') FROM DUAL; 06...
2017-12-26, 2748🔥, 0💬

Calculating the Difference between Two Time Values in MySQL
How To Calculate the Difference between Two Time Values in MySQL? If you have two time values, and you want to know the time difference between them, you can use the TIMEDIFF(time1, time2) function as shown below: SELECT TIMEDIFF(TIME('19:26:50'), TIME('09:26:50')) FROM DUAL; 10:00:00 SELECT TIMEDIF...
2017-12-26, 2416🔥, 0💬

Decrementing a Date by 1 in MySQL
How To Decrement Dates by 1 in MySQL? 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 exercise below gives you some good examples: SEL...
2017-12-26, 2028🔥, 0💬

Calculating the Difference between Two Dates in MySQL
How To Calculate the Difference between Two Dates in MySQL? If you have two dates, and you want to know how many days between them, you can use the DATEDIFF(date1, date2) function as shown below: SELECT DATEDIFF(DATE('1997-02-28'), DATE('1997-03-01')) FROM DUAL; -1   ⇒ Calculating the Difference bet...
2017-12-26, 1791🔥, 0💬

Incrementing a Date by 1 in MySQL
How To Increment Dates by 1 in MySQL? 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 exercise below gives you some good examples: SELECT DATE...
2017-12-26, 1494🔥, 0💬

Returning Top 5 Rows in MySQL
How To Return Top 5 Rows in MySQL? 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 fyi_links: mysql&gt; SELECT id, url, counts, tag FR...
2017-12-21, 1387🔥, 0💬

Returning the Second 5 Rows in MySQL
How To Return the Second 5 Rows in MySQL? If you want to display query output in multiple pages with 5 rows per page, and the visitor wants to see the output for the second page, you need to display query output from row 6 to row 10. You can use the "LIMIT startRow maxRows" clause to return only row...
2017-12-21, 1377🔥, 0💬

Using Subqueries in the FROM Clause in MySQL
How To Use Subqueries in the FROM clause in MySQL? 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 used in this way become a temporary table, and you mus...
2017-12-21, 1371🔥, 0💬

Merge Outputs from Two Queries in MySQL
How To Use UNION to Merge Outputs from Two Queries Together in MySQL? If you have two queries that returns the same row fields, you can merge their outputs together with the UNION operator. The following tutorial exercise shows you how to return all links that were created since year 2006 plus the o...
2017-12-21, 1359🔥, 0💬

Counting Groups Returned from GROUP BY in MySQL
How To Count Groups Returned with the GROUP BY Clause in MySQL? If you use the COUNT(*) function on groups returned with the GROUP BY clause, it will count the number of rows within each group, not the number of groups. If you want to count the number of groups, you can put the GROUP BY query into a...
2017-12-21, 1292🔥, 0💬

Managing User Accounts and Access Privileges in MySQL
Where to find answers to frequently asked questions on Managing User Accounts and Access Privileges in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Managing User Accounts and Access Privileges in MySQL. Clear answers are provided with tu...
2017-12-13, 1720🔥, 0💬

Listing All User Accounts in MySQL
How To List All Existing User Accounts in MySQL? MySQL stores all existing user accounts in a table called "mysql.user". If you want see all user accounts, you can use the "SELECT" command as shown in the tutorial exercise below: &gt;cd \mysql\bin &gt;mysql -u root -pretneciyf mysql mysql&am...
2017-12-13, 1376🔥, 0💬

Deleting a User Account in MySQL
How To Delete a User Account in MySQL? If you want to delete a user account, you can connect to the server as "root" and use the "DROP USER ..." command to delete a user account. The tutorial exercise below shows you a good example: &gt;cd \mysql\bin &gt;mysql -u root -pretneciyf mysql mysql...
2017-12-13, 1370🔥, 0💬

What Is a User Account in MySQL
What Is a User Account in MySQL? A user account is identified by a user name and defines the user's attributes, including the following: Password for connection authentication. User privileges, for examples: Shutdown_priv, Create_priv, Drop_priv, Insert_priv, Update_priv, Delete_priv, etc.. Various ...
2017-12-13, 1370🔥, 0💬

Rename an Existing User Account in MySQL
How To Rename an Existing User Account Name in MySQL? If you want to change the name of an existing user account, you can use the "RENAME USER oldName TO newName" command. The tutorial exercise below shows you how to do this: &gt;cd \mysql\bin &gt;mysql -u root -pretneciyf mysql mysql&gt...
2017-12-13, 1315🔥, 0💬

Scope Levels of User Privileges in MySQL
How Many Scope Levels Can User Privileges Apply in MySQL? MySQL supports 5 scope levels a user privilege can be granted: Global Level - A privilege granted at this level applies to all databases on the server. Privileges granted at the global level stored in "mysql.user" table. Database Level - A pr...
2017-12-09, 2503🔥, 0💬

User Privilege Tables in MySQL
Where Are User Privileges Stored on the Server in MySQL? MySQL server has a system database, which hosts a number of system tables to system related information like user privileges. Depending on the scope levels, granted user privileges are stored in different tables: "mysql.user" - Stores privileg...
2017-12-09, 1920🔥, 0💬

What Is MySQL Server Daemon - mysqld in MySQL
What Is the MySQL Server Daemon - mysqld in MySQL? "mysqld" is MySQL server daemon program which runs quietly in background on your computer system. Invoking "mysqld" will start the MySQL server on your system. Terminating "mysqld" will shutdown the MySQL server. Here is a tutorial example of invoki...
2017-12-09, 1614🔥, 0💬

What Are User Privileges in MySQL
What Are User Privileges in MySQL? MySQL offers many user privileges to control user accesses to different functions and data objects. Here are some commonly used privileges: ALL - All privileges. CREATE - Allows the user to use CREATE TABLE commands. ALTER - Allows the user to use ALTER TABLE comma...
2017-12-09, 1498🔥, 0💬

<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:311  Sort:Rank