<< < 22 23 24 25 26 27 28 29 30 31 32 > >>   Sort: Date

SCROLL - Creating Cursors for Backward Scrolling in SQL Server
How To Create a Scrollable Cursor with the SCROLL Option in SQL Server Transact-SQL? SQL Server offers two scrolling option on cursors: 1. FORWARD_ONLY - The cursor can only be scrolled forward with "FETCH NEXT" statements. In another word, you can only loop through the cursor from the first row to ...
2016-10-17, 383👍, 0💬

List Table Names with "mysqlshow" Command in MySQL
How To Show Table Names with "mysqlshow" in MySQL? If you want to show table names with "mysqlshow", you need to specify a database name. The followings tutorial exercise shows you how to get all table names that match a pattern: If you want analyze tables with "mysqlcheck", you need to use the "--a...
2018-05-19, 382👍, 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, 382👍, 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, 382👍, 0💬

Shutdown MySQL Server Properly in MySQL
How To Properly Shutdown MySQL Server Daemon mysqld in MySQL? The proper way to shutdown your MySQL server is to the use "mysqladmin shutdown" command. Other ways to shutdown your server include: Enter "mysqladmin -u root -ppassowrd shutdown" command with options in a command window. Use Windows Tas...
2017-12-04, 382👍, 0💬

Connect MS Access to Oracle Servers in Oracle
How To Connect MS Access to Oracle Servers in Oracle? Once you got a DSN defined in the ODBC manager that connects to an Oracle server, you can connect a normal MS Access document to the Oracle server, and link an Access table to Oracle table. The tutorial below gives you a good example: Start MS Ac...
2016-10-15, 382👍, 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, 381👍, 0💬

Rollback the Current Transaction in MySQL
How To Rollback the Current Transaction in MySQL? If you have used some DML statements updated some data objects, you find a problem with those updates, and you don't want those updates to be permanently recorded in the database, you can use the ROLLBACK command. It will remove all the database chan...
2016-10-17, 381👍, 0💬

Number of Rows Selected or Affected in MySQL
How To Get the Number of Rows Selected or Affected by a SQL Statement in MySQL? There are two functions you can use the get the number of rows selected or affected by a SQL statement: mysql_num_rows($res) - Returns the number of rows selected in a result set object returned from SELECT statement. my...
2017-10-08, 380👍, 0💬

UPDATE Subquery Returning Multiple Rows in SQL Server
What Happens If the UPDATE Subquery Returns Multiple Rows in SQL Server? If a subquery is used in a UPDATE statement, it must return exactly one row for each row in the update table that matches the WHERE clause. If it returns multiple rows, SQL Server will give you an error message. To test this ou...
2016-11-02, 380👍, 0💬

Declaring and Using Cursor Variables in SQL Server
How To Declare and Use Cursor Variables in SQL Server Transact-SQL? There are two ways to representing a cursor: 1. A cursor name - A static name representing a cursor object. A cursor name should be linked to a cursor object in the DECLARE statement. 2. A cursor variable name - A variable name poin...
2016-10-17, 380👍, 0💬

What Is a SELECT Query Statement in SQL Server
What Is a SELECT Query Statement in SQL Server? The SELECT statement is also called the query statement. It is the most frequently used SQL statement in any database application. SELECT statements allows you to retrieve data from one or more tables or views, with different selection criteria, groupi...
2016-10-26, 379👍, 0💬

"DELETED" - Old Record of an DML Event Instance in SQL Server
How To Access the Deleted Record of an Event in SQL Server? When a DML event occurs, SQL Server will prepare a temporary table called "DELETED", which contains the old record of the affected row, which is: A copy of the deleted row for a DELETE statement. A copy of the row to be updated for an UPDAT...
2016-10-24, 379👍, 0💬

Define Variables before Procedures and Functions in Oracle
What Is the Order of Defining Local Variables and Sub Procedures/Functions in Oracle? In the declaration part, you must define all local variables before defining any sub procedures or sub functions. See the following sample script: SQL&gt; CREATE OR REPLACE PROCEDURE WELCOME AS 2 SITE CHAR(80) ...
2018-03-18, 378👍, 0💬

Turn on Query Logs in MySQL
How To Turn on Query Logs in MySQL? If you want MySQL to write query logs to a file, you can use the "--log=fileName" option at the "mysqld" command line. The tutorial exercise below shows you a good example on how to use this option and view the query log file: &gt;cd \mysql\bin &gt;mkdir \...
2017-12-04, 378👍, 0💬

Creating a New Database in MySQL
How To Create a New Database in MySQL? A database in a MySQL server is a logical container used to group tables and other data objects together as a unit. If you are the administrator of the server, you can create a new databases using the CREATE DATABASE statements with MySQL client interface progr...
2017-11-11, 378👍, 0💬

Database in Use When Dropping a Database in SQL Server
Why I am getting this error when dropping a database in SQL Server? If you are trying to drop a database that is in use, you will get an error message like this: 'Cannot drop database "FyiCenterData" because it is currently in use.' Before dropping a database, you must stop all client sessions using...
2016-11-24, 378👍, 0💬

Run CREATE DATABASE Statement in Oracle
How To Run CREATE DATABASE Statement in Oracle? This is Step 7. Oracle Administrator Guide provided a sample CREATE DATABASE statement. But it is a long statement. You can modify and same it in a file, $ORACLE_HOME/configscripts/cre ate_database_fyi.sql,and run the file within SQL*Plus. Here is a co...
2018-05-08, 377👍, 0💬

What Is a Database in SQL Server
What is a database in SQL Server? A database is a logical container that contains a set of related database objects: Tables - Storages of structured data. Views - Queries to present data from tables. Indexes - Sorting indexes to speed up searches. Stored Procedures - Predefined SQL program units. Us...
2016-11-24, 377👍, 0💬

Creating Databases with Specified Physical Files in SQL Server
How to create database with physical files specified in SQL Server? If you don't like the default behavior of the CREATE DATABASE statement, you can specify the physical database files with a longer statement: CREATE DATABASE database_name ON (NAME = logical_data_name, FILENAME = physical_data_name,...
2016-11-24, 377👍, 0💬

Transaction Committed when DDL Statement Executed in MySQL
What Happens to the Current Transaction If a DDL Statement Is Executed in MySQL? If a DDL statement is executed, the current transaction will be committed and ended. All the database changes made in the current transaction will become permanent. This is called an implicit commit by a DDL statement. ...
2016-10-17, 377👍, 0💬

Using SELECT Statements in Views in MySQL
Can SELECT Statements Be Used on Views in MySQL? Select (query) statements can be used on views in the same way as tables. The following tutorial exercise helps you creating a view and running a query statement on the view: mysql&gt; CREATE VIEW myLinks AS SELECT * FROM fyi_links WHERE url LIKE ...
2018-01-06, 376👍, 0💬

Updating Values with UPDATE Statements in SQL Server
How To Update Values in a Table with UPDATE Statements in SQL Server? If you want to update some values in one row or multiple rows in a table, you can use the UPDATE statement. The tutorial script below shows a good example: SELECT * FROM fyi_links WHERE id = 101 GO id url notes counts created 101 ...
2016-11-02, 376👍, 0💬

Numeric Data Types in MySQL
What Are Numeric Data Types in MySQL? MySQL supports the following numeric data types: BIT(n) - An integer with n bits. BOOL same as BOOLEAN - Boolean values stored in 1 bit. TINYINT - A small integer stored in 1 byte. SMALLINT - A small integer stored in 2 bytes. MEDIUMINT - A medium integer stored...
2018-01-19, 375👍, 0💬

<< < 22 23 24 25 26 27 28 29 30 31 32 > >>   Sort: Date