<< < 30 31 32 33 34 35 36 37 38 39 40 > >>   ∑:1253  Sort:Date

Converting Integers into Date and Time Values in SQL Server
Can Integers Be Converted into Date and Time Values in SQL Server Transact-SQL? Can integers be converted into date and time values? The answer is yes. The input integer will be used as the number of days relative to the base date: Jan 1, 1900. The time of the day will be set to 0, midnight of the d...
2017-02-22, 1505🔥, 0💬

Define Anonymous Procedures without Variables in Oracle
How To Define an Anonymous Procedure without Variables in Oracle? Anonymous procedure is a procedure without any name. If you don't have any variables to declare, you can define an anonymous procedure by using the BEGIN keyword directly in SQL*Plus as shown in the following tutorial script: SQL&...
2018-01-27, 1504🔥, 0💬

Index Speeding Up SELECT Statements in SQL Server
Does Index Speed Up SELECT Statements in SQL Server? If you want to see the impact of indexes on SELECT statements, you can run the same SELECT statement on "fyi_links" and "fyi_links_indexed" tables. See the tutorial exercise below: USE FyiCenterData; GO -- Run SELECT on the table without indexes D...
2016-11-13, 1503🔥, 0💬

"CREATE TRIGGER" - Creating a DDL Trigger in SQL Server
How To Create a DDL Trigger using "CREATE TRIGGER" Statements in SQL Server? A DDL trigger is defined to handle a DDL statement event, like create, alter and drop tables, views, indexes, etc. DDL triggers can be used to generate warning messages on database object changes. The format of creating a D...
2016-10-22, 1503🔥, 0💬

Commit the Current Transaction in Oracle
How To Commit the Current Transaction in Oracle? If you have used some DML statements updated some data objects, and you want to have the updates to be permanently recorded in the database, you can use the COMMIT statement. It will make all the database changes made in the current transaction become...
2019-09-04, 1499🔥, 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, 1499🔥, 0💬

Retrieving Execution Error Message in MySQL
How To Get MySQL Statement Execution Errors in MySQL? When you execute a MySQL statement with mysql_query(), and the statement failed, mysql_query() will return the Boolean value FALSE. This is good enough to tell that there is something wrong with that statement. But if you want to know more about ...
2017-10-23, 1499🔥, 0💬

What Is Commit in MySQL
What Is Commit in MySQL? Commit is a way to terminate a transaction with all database changes to be saved permanently to the database server.   ⇒ What Is RollBack in MySQL ⇐ What Is Transaction in MySQL ⇑ Database Basics and Terminologies in MySQL ⇑⇑ MySQL Database Tutorials
2016-10-16, 1499🔥, 0💬

Insert a RECORD into a Table in Oracle
How To Insert a RECORD into a Table in Oracle? If you have a RECORD variable with data fields matching a table structure, you can insert a row to this table with this RECORD variable using the INSERT statement as shown in the example below: CREATE TABLE emp_temp AS SELECT * FROM employees; CREATE OR...
2018-08-14, 1498🔥, 0💬

What Do You Think about PL/SQL in Oracle
What Do You Think about PL/SQL in Oracle? After following through the tutorials in the FAQ collection, you probably agree that PL/SQL is indeed a general purpose database programming language. PL/SQL is a natural extension of SQL. It is very useful for DBA to automate specific administration tasks o...
2019-02-18, 1497🔥, 0💬

Using Table Alias Names in MySQL
How To Define and Use Table Alias Names in MySQL? When column names need to be prefixed with table names, you can define table alias name and use them to prefix column names as shown in the following select statement: mysql&gt; SELECT l.id, l.url, r.comment FROM fyi_links l INNER JOIN fyi_rates ...
2017-12-31, 1497🔥, 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, 1497🔥, 0💬

ALTER VIEW - Modifying Existing Views in SQL Server
How To Modify the Underlying Query of an Existing View in SQL Server? If you have an existing view, and want to change the underlying SELECT statement, you can use the "ALTER VIEW ..." statement to redefine the view. The tutorial exercise below shows you how modify an existing view: USE FyiCenterDat...
2016-11-04, 1497🔥, 0💬

"ALTER LOGIN" - Changing a Login Name in SQL Server
How To Change a Login Name in SQL Server? If you want to change a login name, you can use the "ALTER LOGIN" statement as shown in this tutorial example: -- Login with "sa" -- Change login name ALTER LOGIN Fyi_Login WITH NAME = Dba_Login; GO -- View login names SELECT name, sid, type, type_desc FROM ...
2016-10-19, 1497🔥, 0💬

General Rules on Data Consistency in Oracle
What Are the General Rules on Data Consistency in Oracle? Here is a list of general rules on data consistency: All SQL statements always work with a snapshot of the database to provide data consistency. For READ WRITE transactions, the snapshot is taken when each statement starts. For READ ONLY tran...
2019-08-19, 1496🔥, 0💬

Understanding and Managing Views in SQL Server
Where to find answers to frequently asked questions on Understanding and Managing Views in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Understanding and Managing Views in SQL Server. Clear answers are provided with tutorial exercis...
2016-11-08, 1496🔥, 0💬

Using Cursors in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Using Cursors in SQL Server Transact-SQL? I want to loop through rows in a result set. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Using Cursors in SQL Server Transact-SQL. Clear explanati...
2016-10-17, 1494🔥, 0💬

Run Queries on External Tables in Oracle
How To Run Queries on External Tables in Oracle? If you have an external table defined as a text file with the ORACLE_LOADER driver, you can add data to the text file, and query the text file through the external table. By default, data fields in the text file should be terminated by ','. The tutori...
2016-10-15, 1494🔥, 0💬

Experiments of Data Locks in Oracle
How To Experiment a Data Lock in Oracle? If you want to have some experience with data locks, you can create two windows running two SQL*Plus sessions. In session 1, you can run a UPDATE statements to create a data lock. Before committing session 2, switch to session 2, and run a UPDATE statements o...
2019-08-08, 1493🔥, 0💬

Getting Help Information from the Server in MySQL
How To Get Help Information from the Server in MySQL? While you are at the "mysql&gt;" prompt, you can get help information from the server by using the "HELP" command. The tutorial exercise below shows sevearal examples: &gt;cd \mysql\bin &gt;mysql -u root mysql&gt; HELP; ... List o...
2018-02-08, 1492🔥, 0💬

Use Existing Column Values in the SET Clause in MySQL
How To Use Existing Column Values in the SET Clause in MySQL? 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 column names in the expressions. The tutorial exer...
2018-01-13, 1491🔥, 0💬

Arithmetic Operations with Different Data Types in SQL Server
What Happens to an Arithmetic Operation with Two Different Data Types in SQL Server Transact-SQL? When two expressions with different data types are put together for an arithmetic operation, the expression with a lower rank data type will be converted automatically to higher rank data type. Usually,...
2017-03-27, 1491🔥, 0💬

Converting Numeric Expressions from One Data Type to Another in SQL Server
How To Convert a Numeric Expression from One Data Type to Another in SQL Server Transact-SQL? There are 4 ways to convert a numeric expression from one data type to another data type: Implicit conversion by arithmetic operations - When arithmetic operations are performed on expressions of different ...
2017-03-27, 1491🔥, 0💬

Moving Database Physical Files to New Locations in SQL Server
How to move database physical files in SQL Server? If you want to move database physical files to a new location, you can use the "ALTER DATABASE" statements to bring the database offline, and link it to the files at the new location. The following tutorial gives you a good example: ALTER DATABASE F...
2016-11-20, 1491🔥, 0💬

<< < 30 31 32 33 34 35 36 37 38 39 40 > >>   ∑:1253  Sort:Date