Databases

»»Databases

How to Backup and Restore (Export and Import) MySQL Databases Tutorial

phpMyAdmin can be used to export or backup MySQL or MariaDB databases easily. However, if the database size is very big, it probably won't be a good idea. phpMyAdmin allows users to save database dump as file [...]

By | 2016-12-09T08:39:44+00:00 December 9th, 2016|Categories: Databases|Tags: , , |41 Comments

MySQL Error 1170 (42000): BLOB/TEXT Column Used in Key Specification Without a Key Length

When creating a new table or altering an existing table with primary keys, unique constraints and indexes, or when defining a new index with Alter Table manipulation statement in MySQL database, the following error may occur and [...]

By | 2016-12-09T08:39:49+00:00 December 9th, 2016|Categories: Databases|Tags: |18 Comments

Remove or Trim First or Last Few Characters in MySQL Database with SQL

Another useful string function in MySQL database is TRIM() which will return a text string after removing the matching leading or trailing characters, also known as prefixes or suffixes. It's been described by MySQL reference as function [...]

By | 2016-12-09T08:40:08+00:00 December 9th, 2016|Categories: Databases|Tags: , , |6 Comments

How to Find and Replace Text in MySQL Database using SQL

MySQL database has a handy and simple string function REPLACE() that allows table data with the matching string (from_string) to be replaced by new string (to_string). This is useful if there is need to search and replace [...]

By | 2016-12-09T08:40:08+00:00 December 9th, 2016|Categories: Databases|Tags: , , |77 Comments

How to Escape Characters in Oracle PL/SQL Queries

Oracle databases reserve some special characters with specific meaning and purpose within Oracle environment. These reserved characters include _ (underscore) wild card character which used to match exactly one character, % (percentage) which used to match zero [...]

By | 2016-12-09T08:40:15+00:00 December 9th, 2016|Categories: Databases|Tags: , |2 Comments

Duplicate, Copy or Backup Tables in MySQL, MariaDB, Oracle, PostgreSQL, DB2 and SQLite with Create Table As SQL

In Oracle, PostgreSQL, DB2, MySQL, MariaDB and SQLite database system, there is a nice command feature called Create Table As which allows easy duplicating of a table with data from another or a few other tables. The [...]

By | 2016-12-09T08:40:19+00:00 December 9th, 2016|Categories: Databases|Tags: , , , |8 Comments

Change or Set MySQL Long Query Time Value for log-slow-queries

If you enable slow queries log of MySQL database server, you will notice that from the slow query log file contains only SQL statements and queries that took more than query_time of 10 seconds to execute or [...]

By | 2016-12-09T08:40:36+00:00 December 9th, 2016|Categories: Databases|Tags: |2 Comments

Enable Logging of Slow Queries (Slow Query Log) in MySQL Database

One of the main requirements for a fast web server is to has efficient and effective SQL statements or queries that are optimized. Any non-optimal SQL (Structured Query Language) commands or statements that take too long or [...]

By | 2016-12-09T08:40:36+00:00 December 9th, 2016|Categories: Databases|Tags: |6 Comments

Delete, Remove or Drop Oracle Stored Packages with Drop Package

Oracle Package is an object in Oracle database that allows developers and designers to group procedures and functions into common groups, typically based upon their functionality. Package can be treated as the container for functions and procedures. [...]

By | 2016-12-09T08:40:41+00:00 December 9th, 2016|Categories: Databases|Tags: |0 Comments

ORA-00942 Table or View Does Not Exist Oracle Error

Sometime when you compile an object or package or view in Oracle, or execute some PL/SQL statements on Oracle table, or when running an Oracle program or application, the following error my occurs: ORA-00942: table or view [...]

By | 2016-12-09T08:40:41+00:00 December 9th, 2016|Categories: Databases|Tags: |6 Comments

Pin It on Pinterest