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

CREATE, ALTER and DROP Statements in MySQL
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on CREATE, ALTER and DROP Statements in MySQL. Clear answers are provided with tutorial exercises on cr...
2018-03-13, 3362🔥, 0💬

Ways to Get the Current Time in MySQL
How Many Ways to Get the Current Time in MySQL? There are 8 ways to get the current time: SELECT NOW() FROM DUAL; 2006-07-01 10:02:41 SELECT CURRENT_TIME() FROM DUAL; 10:02:58 SELECT SYSDATE() FROM DUAL; 2006-07-01 10:03:21 mysql&gt; SELECT CURRENT_TIMESTAMP() FROM DUAL; 2006-07-01 10:04:03 SELE...
2018-03-13, 3001🔥, 0💬

What Is TIMESTAMP Data Type in MySQL
What Is TIMESTAMP Data Type in MySQL? A TIMESTAMP data type allows you to record a date and time like DATETIME data type. But it has some interesting features when used on a table column: The first TIMESTAMP column in a table will be assigned with the current date and time, if it is not listed in an...
2018-03-13, 1871🔥, 0💬

Extract Unit Values from a Date and Time in MySQL
How To Extract a Unit Value from a Date and Time in MySQL? If you want to extract a specific date or time unit value out of a date or a time, you can use the EXTRACT(unit FROM expression) function. The tutorial exercise below gives you some good examples: ELECT EXTRACT(DAY FROM NOW()) FROM DUAL; 28 ...
2018-03-13, 1744🔥, 0💬

CREATE Command Denied Error in MySQL
What Happens If You No CREATE Privilege in a Database in MySQL? In order to create tables in a database, your user account must have the CREATE privilege for that database. Otherwise you will get an error as shown in the following tutorial exercise: &gt;cd \mysql\bin &gt;mysql -u guest -ppub...
2018-03-10, 2552🔥, 0💬

Show All Columns of an Existing Table in MySQL
How To Get a List of Columns in an Existing Table in MySQL? If you have an existing table, but you don't remember what are the columns used in the table, you can use the "SHOW COLUMNS FROM tableName" command to get a list of all columns of the specified table. You can also use the "DESCRIBE tableNam...
2018-03-10, 2137🔥, 0💬

What Are DDL Statements in MySQL
What Are DDL Statements in MySQL? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are 3 primary DDL statements: CREATE - Creating a new database object. ALTER - Altering the definition of an existing data object. DROP - Dropping an exis...
2018-03-10, 1757🔥, 0💬

Show All Tables in a Database in MySQL
How To Get a List of All Tables in a Database in MySQL? If you want to see the table you have just created, you can use the "SHOW TABLES" command to get a list of all tables in database. The tutorial script gives you a good example: mysql&gt; SHOW TABLES; +---------------+ | Tables_in_fyi | +---...
2018-03-10, 1677🔥, 0💬

CREATE TABLE Statement in MySQL
How To Create a New Table in MySQL? If you want to create a new table, you can use the "CREATE TABLE" statement. The following tutorial script shows you how to create a table called "tip": mysql&gt; CREATE TABLE tip (id INTEGER PRIMARY KEY, subject VARCHAR(80) NOT NULL, description VARCHAR(256) ...
2018-03-10, 1627🔥, 0💬

Rename an Existing Column in a Table in MySQL
How To Rename an Existing Column in a Table in MySQL? If you have an existing column in a table and you want to change the column name, you can use the "ALTER TABLE ... CHANGE" statement. This statement allows you to change the name of a column, and its definition. The tutorial script below gives yo...
2018-03-04, 1937🔥, 0💬

Add a New Column to an Existing Table in MySQL
How To Add a New Column to an Existing Table in MySQL? If you have an existing table with existing data rows, and want to add a new column to that table, you can use the "ALTER TABLE ... ADD COLUMN" statement. The tutorial script below shows you a good example: mysql&gt; ALTER TABLE tip ADD COLU...
2018-03-04, 1760🔥, 0💬

Creating New Tables with SELECT Statements in MySQL
How To Create a New Table by Selecting Rows from Another Table in MySQL? Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the "CREATE TABLE ... SELECT" statement. The tutorial script below gives you a good...
2018-03-04, 1722🔥, 0💬

Show CREATE TABLE Statements of Existing Tables in MySQL
How To See the CREATE TABLE Statement of an Existing Table in MySQL? If you want to know how an existing table was created, you can use the "SHOW CREATE TABLE" command to get a copy of the "CREATE TABLE" statement back on an existing table. The following tutorial script shows you a good example: mys...
2018-03-04, 1717🔥, 0💬

Delete an Existing Column in a Table in MySQL
How To Delete an Existing Column in a Table in MySQL? If you have an existing column in a table and you do not need that column any more, you can delete it with "ALTER TABLE ... DROP COLUMN" statement. Here is a tutorial script to delete an existing column: mysql&gt; ALTER TABLE tip DROP COLUMN ...
2018-03-04, 1631🔥, 0💬

Analyze Tables with "mysqlcheck" Command in MySQL
How To Analyze Tables with "mysqlcheck" in MySQL? 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: &gt;cd \mysql\bin &gt;mysqlcheck -u root --analyze mysql mysql.colu...
2018-02-28, 2153🔥, 0💬

What Is "mysqlcheck" Command in MySQL
What Is "mysqlcheck" in MySQL? "mysqlcheck" is a command-line interface for administrators to check and repair tables. Here are some sample commands supported by "mysqlcheck": "mysqlcheck databaseName tableName" - Checks the specified table in the specified database. "mysqlcheck databaseName" - Chec...
2018-02-28, 2037🔥, 0💬

What Is "mysqlshow" Command in MySQL
What Is "mysqlshow" in MySQL? "mysqlshow" is a command-line interface for end users to see information on tables and columns. Here are some sample commands supported by "mysqlshow": "mysqlshow" - Shows all the databases. "mysqlshow databaseName" - Shows all the tables in the specified database. "mys...
2018-02-28, 1617🔥, 0💬

Use "mysql" to Run SQL Statements in MySQL
How To Use "mysql" to Run SQL Statements in MySQL? If you want to run SQL statement to your server with "mysql", you need to start "mysql" and enter your SQL statement at the "mysql" prompt. Here is a good tutorial exercise that shows you how to run two SQL statements with "mysql": &gt;cd \mysql...
2018-02-28, 1595🔥, 0💬

List All Tables with "mysql" Command in MySQL
How To Show All Tables with "mysql" in MySQL? If you want to see all the tables in a database, you run the non-SQL command "SHOW TABLES" at the "mysql" prompt. See the following tutorial exercise for example: &gt;cd \mysql\bin &gt;mysql -u root test Welcome to the MySQL monitor. Commands end...
2018-02-28, 1505🔥, 0💬

Show All Indexes of a given Table in MySQL
How To Get a List of Indexes of a Given Table in MySQL? If you want to see the index you have just created for an existing table, you can use the "SHOW INDEX FROM tableName" command to get a list of all indexes in a given table. The tutorial script below shows you a nice example: mysql&gt; SHOW ...
2018-02-14, 1770🔥, 0💬

Create an Index for a Given Table in MySQL
How To Create an Index for a Given Table in MySQL? If you have a table with a lots of rows, and you know that one of the columns will be used often as a search criteria, you can add an index for that column to improve the search performance. To add an index, you can use the "CREATE INDEX" statement ...
2018-02-14, 1648🔥, 0💬

Drop an Existing Index in MySQL
How To Drop an Existing Index in MySQL? If you don't need an existing index any more, you should delete it with the "DROP INDEX indexName ON tableName" statement. Here is an example SQL script: mysql&gt; DROP INDEX tip_subject ON tip; Query OK, 0 rows affected (0.13 sec) Records: 0 Duplicates: 0...
2018-02-14, 1635🔥, 0💬

Drop an Existing Table in MySQL
How To Drop an Existing Table in MySQL? If you want to delete an existing table and its data rows, you can use the "DROP TABLE" statement as shown in the tutorial script below: mysql&gt; SELECT * FROM tipBackup; +----+-------------+---------- ---------------+-------------+| id | subject | descri...
2018-02-14, 1595🔥, 0💬

Rename an Existing Table in MySQL
How To Rename an Existing Table in MySQL? If you want to rename an existing table, you can use the "ALTER TABLE ... RENAME TO" statement. The tutorial script below shows you a good example: mysql&gt; ALTER TABLE tip RENAME TO faq; Query OK, 0 rows affected (0.01 sec) mysql&gt; SELECT * FROM ...
2018-02-14, 1510🔥, 0💬

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