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

Use Existing Column Values in SET Clause in Oracle
How To Use Existing Values in UPDATE Statements in Oracle? If a row matches the WHERE clause in a UPDATE statement, existing values in this row can be used in expressions to provide new values in the SET clause. Existing values are represented by columns in the expressions. The tutorial exercise bel...
2020-01-21, 1425🔥, 0💬

Enter a New Row Interactively in Oracle
How To Enter a New Row into a Table Interactively in Oracle? If you don't like to use the INSERT statement to enter a new row into a table, you can use the object view to enter it interactively. Follow the steps below to enter new row into table TIP: Double-click on the table name TIP. Click the Dat...
2018-10-08, 1425🔥, 0💬

NULL Values Involved in Arithmetic Operations in SQL Server
What Happens If NULL Values Are Involved in Arithmetic Operations in SQL Server Transact-SQL? If NULL values are involved in arithmetic operations, the result will be numeric NULL values. The following tutorial script shows you some good examples: SELECT 7+NULL; GO ----------- NULL SELECT 10.02*NULL...
2017-02-05, 1424🔥, 0💬

Work with Data Objects Interactively in Oracle
How To Work with Data Objects Interactively in Oracle? You can work with data objects through SQL statements in statement area. If you want to work with data objects interactively, you should use the object browser. The following tutorial steps help you to browse data objects: Click the Connetions t...
2018-10-08, 1423🔥, 0💬

What Is NULL Value in MySQL
What Are NULL Values in MySQL? NULL is a special value that represents no value. Here are basic rules about NULL values: NULL presents no value. NULL is not the same as an empty string ''. NULL is not the same as a zero value 0. NULL can be used as any data type. NULL should not be used in any compa...
2018-03-28, 1423🔥, 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, 1423🔥, 0💬

Apply Filtering Criteria at Group Level in Oracle
How To Apply Filtering Criteria at Group Level in Oracle? If you want to return only specific groups from the query, you can apply filtering criteria at the group level by using the HAVING clause inside the GROUP BY clause. The following script gives you a good HAVING example: SQL&gt; SELECT dep...
2019-11-21, 1422🔥, 0💬

Sort the Query Output in Oracle
How To Sort the Query Output in Oracle? If you want the returning rows to be sorted, you can specify a sorting expression in the ORDER BY clause. The following select statement returns rows sorted by the values in the "manager_id" column: SQL&gt; SELECT * FROM departments ORDER BY manager_id; DE...
2019-12-19, 1421🔥, 0💬

Use Variables in SQL Statements in Oracle
Can Variables Be Used in SQL Statements in Oracle? Yes, you can use variables in SQL statements as part of any expressions. The tutorial script provides you some good examples: (Connect to XE with SQL*Plus) CREATE TABLE student (id NUMBER(5) PRIMARY KEY, first_name VARCHAR(80) NOT NULL, last_name VA...
2018-09-24, 1421🔥, 0💬

Filter Out Duplications in Returning Rows in Oracle
How To Filter Out Duplications in Returning Rows in Oracle? If there are duplications in the returning rows, and you want to remove the duplications, you can use the keyword DISTINCT or UNIQUE in the SELECT clause. The tutorial exercise below shows you that DISTINCT works on selected columns only: S...
2019-12-19, 1420🔥, 0💬

"CREATE LOGIN" - Creating a New Login Name in SQL Server
How To Create a New Login Name in SQL Server in SQL Server? In previous tutorials, it is assumed that you use the "sa" (System Administrator) login name to connect to your SQL Server. But that is not what a normal developer uses to connect to the server, since "sa" has the ALL permissions granted. Y...
2016-10-20, 1419🔥, 0💬

Selecting an Existing Database in MySQL
How To Select an Exiting Database in MySQL? The first thing after you have created a connection object to the MySQL server is to select the database where your tables are located, by using the mysql_select_db() function. If your MySQL server is offered by your Web hosting company, they will assign a...
2017-10-23, 1418🔥, 0💬

Including Comments in SQL Statements in MySQL
How To Include Comments in SQL Statements in MySQL? If you want to include comments in a SQL statement, you can first enter "--", then enter your comment until the end of the line. The tutorial exercise below shows you some good examples: SELECT 'Hello world!' FROM DUAL; -- My first SQL statement! I...
2018-04-12, 1417🔥, 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, 1417🔥, 0💬

EXISTS - Testing Subquery Results in SQL Server
How To Test Subquery Results with the EXISTS Operator in SQL Server Transact-SQL? EXISTS is a special operator used to test subquery results. EXISTS can be used in two ways: EXISTS (SELECT ...) -- Returns TRUE if the specified subquery has one or more rows returned. NOT EXISTS (SELECT ...) -- Return...
2017-01-21, 1416🔥, 0💬

Deleting a Table That Is Used by a View in SQL Server
What Happens If You Delete a Table That Is Used by a View in SQL Server? Assuming that you have a table which is used by a view, and you try to delete that table. SQL Server will let you delete the table without any trouble. But that view will become invalid. The tutorial exercise below shows you wh...
2016-11-04, 1415🔥, 0💬

Insert Multiple Rows with 1 INSERT Statement in MySQL
How To Insert Multiple Rows with One INSERT Statement in MySQL? 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 a good exa...
2018-01-16, 1414🔥, 0💬

What Is an Expression in SQL Server
What Is an Expression in SQL Server Transact-SQL? An expression is a combination of identifiers, values, and operators that SQL Server 2005 can evaluate to obtain a numeric value. A simple expression could be a constant, a function, a column name, a variable, or a subquery without any operators. Com...
2017-04-01, 1413🔥, 0💬

"CREATE USER" - Creating a User Name in a Database in SQL Server
How To Create a User Name in a Database in SQL Server? User names are security principals at the database level. If you want to allow a login name to access a specific database, you need to create a user name in that database and link it to the login name. Creating a user name can be done by using t...
2016-10-19, 1413🔥, 0💬

Use "FOR" Loop Statements in Oracle
How To Use "FOR" Loop Statements in Oracle? If you have a block of codes to be executed repeatedly over a range of values, you can use the "FOR ... LOOP" statement. Here is a sample script on FOR statements: DECLARE total NUMBER := 0; BEGIN FOR i IN 1..10 LOOP total := total + i; END LOOP; DBMS_OUTP...
2018-07-13, 1412🔥, 0💬

Update Values on Multiple Rows in Oracle
How To Update Values on Multiple Rows in Oracle? If the WHERE clause in an UPDATE matches multiple rows, the SET clause will be applied to all matched rows. This rule allows you to update values on multiple rows in a single UPDATE statement. Here is a good example: UPDATE fyi_links SET counts = 9, n...
2020-01-21, 1409🔥, 0💬

NULL Values Involved in Bitwise Operations in SQL Server
What Happens If NULL Values Are Involved in Bitwise Operations in SQL Server Transact-SQL? If NULL values are involved in bitwise operations, the result will be binary NULL values. The following tutorial script shows you some good examples: SELECT 1 | NULL; GO ----------- NULL SELECT 707 &amp; N...
2017-02-03, 1409🔥, 0💬

Use "WHILE" Loop Statements in Oracle
How To Use "WHILE" Loop Statements in Oracle? If you have a block of codes to be executed repeatedly based a condition, you can use the "WHILE ... LOOP" statement. Here is a sample script on WHILE statements: DECLARE total NUMBER; BEGIN total := 0; WHILE total &lt; 10 LOOP total := total+1; END ...
2018-07-13, 1408🔥, 0💬

Using Subqueries with the EXISTS Operator in MySQL
How To Use Subqueries with the EXISTS Operator in MySQL? A subquery can be used with the EXISTS operator as "EXISTS (subquery)", which returns true if the subquery returns one or more rows. The following statement is a good example of "EXISTS (subquery)". It returns rows from fyi_links table that th...
2017-09-17, 1408🔥, 0💬

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