SQL Server Transact-SQL Tutorials
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-SQL? I want to know how to write database scripts to run on SQL Server. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team about Microsoft SQL Server Tran... 2020-12-02, 2270👍, 0💬
DATEDIFF() - Calculating DATETIME Value Differences in SQL Server
How To Calculate DATETIME Value Differences Using the DATEDIFF() Function in SQL Server Transact-SQL? If you want to calculate the difference between two date and time values, you can use the DATEDIFF() function in the following format: DATEDIFF(datepart, startdate, enddate) returns INT: "startdate"... 2017-02-20, 1720👍, 0💬
Oracle Database Basic Concepts
Where to find answers to frequently asked questions on Oracle basic concepts? I am new to Oracle database. Here is a list of frequently asked questions and their answers on Oracle basic concepts compiled by FYIcenter.com DBA team about Oracle database basic concepts: What Is Oracle in Oracle What Is... 2020-11-11, 1713👍, 0💬
Define External Table in a Text File in Oracle
How To Define an External Table in a Text File in Oracle? You can use the CREATE TABLE statement to create external tables. But you need to use ORGANIZATION EXTERNAL clause to specify the external file location and the data access driver. The tutorial exercise below shows you how to define an extern... 2016-10-19, 1710👍, 1💬
CREATE TABLE - Creating New Tables in SQL Server
How to create new tables with "CREATE TABLE" statements in SQL Server? 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": CREATE TABLE tip (id INTEGER PRIMARY KEY, subject VARCHAR(80) NOT NULL, desc... 2016-11-17, 1701👍, 0💬
Requirements for Using MySQL in PHP in MySQL
What Do You Need to Connect PHP to MySQL in MySQL? If you want to access MySQL database server in your PHP script, you need to make sure that a MySQL API module (extension) is installed and turned on in your PHP engine. PHP 5 now supports two MySQL API extensions: mysql - This is the standard MySQL ... 2017-07-30, 1676👍, 0💬
Getting Year, Month and Day Out of DATETIME Values in SQL Server
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPART() to get any part of the DATETIME value. But to get year, month and day, you can use 3 specific functions: YEAR(), MONTH() and DAY(). These functions are equivalent to DATEPART() as: YEAR(date) = D... 2017-02-14, 1671👍, 0💬
CREATE, ALTER and DROP Statements in MySQL
Where to find answers to frequently asked questions on CREATE, ALTER and DROP Statements in MySQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on CREATE, ALTER and DROP Statements in MySQL. Clear answers are provided with tutorial exercises on cr... 2018-03-13, 1663👍, 0💬
"CREATE PROCEDURE" - Creating Simple Stored Procedures in SQL Server
How To Create a Simple Stored Procedure in SQL Server Transact-SQL? If you want to create a simple stored procedure with no input and output parameters, you can use the "CREATE PROCEDURE" command with a statement batch in a simple format as shown in below: CREATE PROCEDURE procedure_name AS statemen... 2017-01-05, 1653👍, 0💬
"sys.tables" - Getting a List of All Tables in SQL Server
How To Get a List of All Tables with "sys.tables" View in SQL Server? If you want to see the table you have just created, you can use the "sys.tables" system view to get a list of all tables in the current database. The tutorial script gives you a good example: SELECT name, type_desc, create_date FR... 2018-03-29, 1641👍, 1💬
Show Privileges of the Current User in Oracle
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are listed in two system views: DBA_SYS_PRIVS, and USER_SYS_PRIVS. You can find out what privileges a user currently has by running a query on those views as shown in the tutorial exercise below: >.\bi... 2019-06-11, 1634👍, 0💬
CONVERT() - Converting Numeric Expression Data Types in SQL Server
How To Convert Numeric Expression Data Types using the CONVERT() Function in SQL Server Transact-SQL? If you want to convert the data type of a numeric expression to a new data type, you can use the CONVERT(data_type, expression) function. The tutorial exercise below shows you how to use the CONVERT... 2017-03-27, 1633👍, 0💬
Downloading and Installing SQL Server 2005 Express Edition
Where to find answers to frequently asked questions on Downloading and Installing SQL Server 2005 Express Edition? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Downloading and Installing SQL Server 2005 Express Edition. Clear answers are provid... 2021-02-12, 1626👍, 1💬
CHARINDEX() and SUBSTRING() - Locating and Taking Substrings in SQL Server
How To Locate and Take Substrings with CHARINDEX() and SUBSTRING() Functions in SQL Server Transact-SQL? Transact-SQL is not a language designed for manipulating strings, but it does have two simple functions to locate and take substrings: CHARINDEX() and SUBSTRING(). The tutorial exercise below ass... 2017-03-07, 1624👍, 0💬
AND, OR, XOR, and NOT - Bitwise Operations in SQL Server
What Are Bitwise Operations in SQL Server Transact-SQL? Bitwise operations are binary operations performed on one or two binary strings. SQL Server supports 4 bitwise operations: & (Bitwise AND) - Performing the single bit Boolean operation "AND" on each bit position. | (Bitwise OR) - Perfor... 2017-02-25, 1607👍, 0💬
NULLIF() - Replacing Given Values with NULL in SQL Server
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want to hide certain values by replacing them with NULL values. SQL Server offers you a nice function called NULLIF() to do this: NULLIF(expression, value) -- Returns NULL if "expression" equals to value" -... 2017-01-29, 1604👍, 0💬
CREATE VIEW - Creating a View on an Existing Table in SQL Server
How To Create a View on an Existing Table in SQL Server? If you want to a view on an existing table, you can use the CREATE VIEW statement in a simple syntax: CREATE VIEW view_name AS SELECT ... The tutorial exercise below shows you how to create a view to represent sub set of data stored in fyi_lin... 2016-11-05, 1590👍, 0💬
Conditional Statements and Loops in SQL Server in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Conditional Statements and Loops in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com team on Conditional Statements and Loops in SQL Server Transact-SQL. Clear answers are provided... 2017-01-11, 1577👍, 0💬
"IF ... ELSE IF ..." Statement Structures in SQL Server
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ..." statement structure is used to select one of the specified statements to be executed based on specified Boolean conditions. Here is the syntax of "IF ... ELSE IF ..." statement structure: IF conditi... 2017-01-11, 1555👍, 0💬
Entering 0.001 Second in DATETIME in SQL Server Transact-SQL
Why I Can Not Enter 0.001 Second in DATETIME values in SQL Server Transact-SQL? If you enter milliseconds in data and time values, they will be rounded up to 10/3 millisecond increments, because DATETIME data type uses 4 bytes to store the time of the day. A 4-byte integer can only give an accuracy ... 2017-04-15, 1546👍, 0💬
Is SQL Server Transact-SQL Case Sensitive?
Is SQL Server Transact-SQL case sensitive? No. Transact-SQL is not case sensitive. Like the standard SQL, you can type in your Transact-SQL statement in upper case or lower case. However, you should use upper case for all key words in Transact-SQL statements as a best practice. The following example... 2017-06-16, 1544👍, 0💬
What Is SQL Server Transact-SQL (T-SQL)?
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension of the standard SQL (Structured Query Language). Transact-SQL was developed by Microsoft and Sybase. Microsoft's implementation ships in the Microsoft SQL Server product. Sybase uses the language in ... 2017-06-16, 1544👍, 0💬
Create a Table in a Given Tablespace in Oracle
How To Create a Table in a Specific Tablespace in Oracle? After you have created a new tablespace, you can give it to your users for them to create tables in the new tablespace. To create a table in a specific tablespace, you need to use the TABLESPACE clause in the CREATE TABLE statement. Here is a... 2019-01-08, 1510👍, 1💬
ISNULL() - Replacing NULL Values in Expressions in SQL Server
How To Replace NULL Values in Expressions using ISNULL() in SQL Server Transact-SQL? As you learned from previous tutorials, NULL values presented in expressions will cause the final results to be NULL. Sometimes, you want NULL values to be replaced with some default values, like 0, '', or 'NULL', s... 2017-02-03, 1485👍, 0💬
Dispaly Part Time in Days, Hours and Minutes in MySQL
How To Display a Past Time in Days, Hours and Minutes in MySQL? You have seen a lots of Websites are displaying past times in days, hours and minutes. If you want to do this yourself, you can use the TIMEDIFF() SQL function. Note that the TIMEDIFF() function can only handle time range within 839 hou... 2017-06-23, 1472👍, 0💬
Where to find answers to frequently asked questions on Using User Defined Functions in SQL Server Tr...
Where to find answers to frequently asked questions on Oracle basic concepts? I am new to Oracle dat...
How to download and install the scaled-down database AdventureWorksLT in SQL Server? If you want to ...
What are single-byte character string data types supported in SQL Server Transact-SQL? Single-byte c...
How To Convert Binary Strings into Hexadecimal Character Strings in SQL Server? When a query returns...