<< < 34 35 36 37 38 39 40 41 42 43 44 > >>   ∑:1243  Sort:Date

Testing Local Temporary Stored Procedures in SQL Server
Can Another User Execute Your Local Temporary Stored Procedures in SQL Server Transact-SQL? Can another user execute your local temporary stored procedures? The answer is no. To test this out, continue with the exercise from the previous tutorial. Keep that user session running and open a new client...
2016-12-28, 1442🔥, 0💬

Differences of CHAR and NCHAR in SQL Server Transact-SQL
What Are the Differences between CHAR and NCHAR in SQL Server Transact-SQL? Both CHAR and NCHAR are fixed length data types in Transact-SQL. But they have the following main differences: CHAR stores characters based on the code page with 1 byte per character most of the time. NCHAR stores characters...
2017-04-04, 1441🔥, 0💬

Define an Explicit Cursor in Oracle
How To Define an Explicit Cursor in Oracle? An explicit cursor must be defined in the declaration part of a procedure or function with the CURSOR ... IS statement as shown in the following sample script: DECLARE CURSOR c_list IS SELECT * FROM countries; CURSOR t_list IS SELECT * FROM employees WHERE...
2018-07-22, 1440🔥, 0💬

SELECT Statements with JOIN and Subqueries in MySQL
Where to find answers to frequently asked questions on SELECT Statements with JOIN and Subqueries in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on SELECT Statements with JOIN and Subqueries in MySQL. Clear answers are provided with tutori...
2017-12-31, 1440🔥, 0💬

NULL Values Involved in Comparison Operations in SQL Server
What Happens If NULL Values Are Involved in Comparison Operations in SQL Server Transact-SQL? If NULL values are involved in comparison operations, the result will be Boolean NULL values. This behavior is very interesting because you would expect a comparison operation returns only one of the two va...
2017-02-03, 1440🔥, 0💬

Define a Variable for a Specific RECORD Type in Oracle
How To Define a Variable of a Specific RECORD Type in Oracle? Once you have your specific RECORD type defined, you can define new variables with this specific RECORD type like any other data type. In the sample script below, several variables are defined with a regular data type and a specific RECOR...
2018-09-01, 1439🔥, 0💬

DDL Commands Supported in MySQL
How Many SQL DDL Commands Are Supported by "mysql" in MySQL? There are 4 SQL Data Definition Language (DDL) commands that are supported by "mysql". They are listed below with short descriptions: "CREATE dataObjectType dataObjectName" - Creates new databases, tables, views, triggers, indexes, and oth...
2018-04-21, 1439🔥, 0💬

Ways to Start MySQL Server in MySQL
How To Start MySQL Server Daemon mysqld in MySQL? There are a number of ways to start MySQL server daemon, mysqld: Double click on the file name, mysqld.exe, in a file explorer window. This is an easy way to start the server. But you will not be able to specify any command line options. Enter "mysql...
2017-12-04, 1439🔥, 0💬

Location of Database Files in SQL Server
Where is my database stored on the hard disk in SQL Server? If a database is created with simple CREATE DATABASE statement, the server will create two database files on the hard disk to store data and configuration information about that data bases: database_name.mdf - SQL Server Database Primary Da...
2016-11-24, 1439🔥, 0💬

Duplicate Key Error on Primary Key Columns in SQL Server
What Happens If You Insert a Duplicate Key for the Primary Key Column in SQL Server? If your table has a primary key column, and you are trying to insert a new row with duplicate key value on the primary key column, you will get an error. The reason is simple - Primary key column does not allow dupl...
2016-11-02, 1439🔥, 0💬

Inserting Multiple Rows with One INSERT Statement in SQL Server
How To Insert Multiple Rows with One INSERT Statement in SQL Server? If you want to insert multiple rows with a single INSERT statement, you can use a subquery instead of the VALUES clause. Rows returned from the subquery will be inserted the target table. The following tutorial exercise gives you a...
2016-11-02, 1439🔥, 0💬

Read Consistency in Oracle in Oracle
How Does Oracle Handle Read Consistency in Oracle? Oracle supports two options for you on how to maintain read consistency: READ WRITE (the default option), also called statement-level read consistency. READ ONLY, also called transaction-level read consistency.   ⇒ What Is a READ WRITE Transaction i...
2019-08-23, 1438🔥, 0💬

Deleting an Existing Database in MySQL
How To Drop an Existing Database in MySQL? If want to drop an existing database from the MySQL server, you can use the DROP DATABASE statement. Here is a good example of dropping an existing database: $con = mysql_connect('localhost:8888' ,'dev', 'iyf'); $sql = 'DROP DATABASE fyi'; if (mysql_query($...
2017-10-23, 1437🔥, 0💬

Sorting Query Output in Descending Order in SQL Server
How To Sort Query Output in Descending Order in SQL Server? If you want to sort a column in descending order, you can specify the DESC keyword in the ORDER BY clause. The following SELECT statement first sorts the "tag" in descending order, then sorts the "counts" in ascending order: SELECT tag, cou...
2016-10-26, 1437🔥, 0💬

Count Duplicated Values in a Column in Oracle
How To Count Duplicated Values in a Column in Oracle? If you have a column with duplicated values, and you want to know what are those duplicated values are and how many duplicates are there for each of those values, you can use the GROUP BY ... HAVING clause as shown in the following example. It re...
2019-11-21, 1436🔥, 0💬

Define a RECORD Variable for a Table Row in Oracle
How To Define a RECORD Variable to Store a Table Row in Oracle? If you have a table, and want to define a RECORD variable to store all the data elements of a row from that table, you can use table_name%ROWTYPE to define the RECORD variable as shown in the following sample script: CREATE TABLE studen...
2018-08-14, 1436🔥, 0💬

Turn on Binary Logs in MySQL
How To Turn on Binary Logs in MySQL? If you want MySQL to write binary logs to a file, you can use the "--log-bin=fileBaseName" option at the "mysqld" command line. The tutorial exercise below shows you a good example on how to use this option: &gt;cd \mysql\bin &gt;mkdir \mysql\logs &gt...
2017-11-29, 1436🔥, 0💬

Group Functions with Non-group Selections in MySQL
Can Group Functions Be Mixed with Non-group Selection Fields in MySQL? If a group function is used in the SELECT clause, all other selection fields must be group level fields. Non-group fields can not be mixed with group fields in the SELECT clause. The script below gives you an example of invalid S...
2017-10-16, 1436🔥, 0💬

Run the Anonymous Block Again in Oracle
How To Run the Anonymous Block Again in Oracle? If you have an anonymous block defined in your session, you can run it any time by using the "/" command as shown in the following script: SQL&gt; set serveroutput on; SQL&gt; begin 2 dbms_output.put_line('This is a PL/SQL FAQ.'); 3 end; 4 / Th...
2018-10-30, 1435🔥, 0💬

Loop through the Implicit Cursor in Oracle
How To Loop through Data Rows in the Implicit Curosr in Oracle? You use the FOR ... IN ... LOOP statement to loop through data rows in the implicit cursor as the following syntax: FOR row IN dml_statement LOOP (statement block with row.field) END LOOP; Here "row" is a local RECORD type variable with...
2018-07-22, 1435🔥, 0💬

Overflow Errors on Converting Big Values to Integers in SQL Server
What Happens When Converting Big Values to Integers in SQL Server Transact-SQL? If you are converting a numeric expression to an integer data type and the value is too big for integer storage size, you will get an arithmetic overflow error as shown in the following examples: -- Overflow error on imp...
2017-03-22, 1435🔥, 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, 1435🔥, 0💬

What Is a Dead Lock in Oracle
What Is a Dead Lock in Oracle? A dead lock is phenomenon happens between two transactions with each of them holding a lock that blocks the other transaction as shown in the following diagram: (transaction 1) (transaction 2) update row X to create lock 1 update row Y to create lock 2 update row X (bl...
2019-08-08, 1434🔥, 0💬

Entering Boolean Values in MySQL
How To Enter Boolean Values in SQL Statements in MySQL? 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 | TRUE | FALSE | FALSE | +------+...
2018-03-31, 1434🔥, 0💬

<< < 34 35 36 37 38 39 40 41 42 43 44 > >>   ∑:1243  Sort:Date