<< < 38 39 40 41 42 43 44 45 46 47 48 > >>   ∑:1243  Sort:Rank

Renaming Database Names in SQL Server
How to rename databases in SQL Server? If don't like the name of a database, you can change it by using the "ALTER DATABASE" statement with the following syntax: ALTER DATABASE database_name MODIFY NAME = new_database_name The tutorial example below shows you how change the database name from "FyiCe...
2016-11-24, 1376🔥, 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, 1372🔥, 0💬

"DROP DATABASE" - Deleting Databases in SQL Server
How to delete a database in SQL Server? If you created a database incorrectly, or you have a database that is not needed any more, you can delete it with the "DROP DATABASE" statement with this syntax: DROP DATABASE database_name For example, execute this statement: DROP DATABASE FyiCenterData GO Th...
2016-11-24, 1368🔥, 0💬

Getting a List of All Databases on the Server in SQL Server
How to get a list all databases on the SQL server in SQL Server? If you don't remember database names you have created, you can get a list of all databases on the server by query the "sys.databases" view as shown in this tutorial example: CREATE DATABASE FyiCenterData GO SELECT name, database_id, cr...
2016-11-24, 1295🔥, 0💬

Simplest Way To Create New Databases in SQL Server
What is the simplest way to create a new database in SQL Server? The simplest way to create a new database is to use the "CREATE DATABASE" statement with this syntax: CREATE DATABASE database_name For example, run this statement: CREATE DATABASE FyiCenterData GO A new database called "FyiCenterData"...
2016-11-24, 1212🔥, 0💬

DDL (Data Definition Language) Statements for Tables? in SQL Server
What are DDL (Data Definition Language) statements for tables in SQL Server? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are three primary DDL statements to create and manage tables: CREATE TABLE - Creating a new table. ALTER TABLE ...
2016-11-20, 3388🔥, 0💬

READ_ONLY/READ_WRITE - Database Update Options in SQL Server
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: READ_WRITE - Data objects are allowed to be queried and modified. This is the default. READ_ONLY - Data objects are allowed to be queried, but not allowed to be modified. You can use the "ALTER DATABA...
2016-11-20, 3323🔥, 0💬

OFFLINE - Taking a database offline in SQL Server
How to set a database state to OFFLINE in SQL Server? If you want to move database physical files, you should take the database offline by using the "ALTER DATABASE" statement with the following syntax: ALTER DATABASE database_name SET OFFLINE The following tutorial example will bring "FyiCenterComD...
2016-11-20, 2394🔥, 0💬

Database in Use When Renaming a Database in SQL Server
Why I am getting this error when renaming a database in SQL Server? If you are trying to rename a database that is in use, you will get an error message like this: "The database could not be exclusively locked to perform the operation." Before renaming a database, you must stop all client sessions u...
2016-11-20, 1633🔥, 0💬

ONLINE/OFFLINE - Database States in SQL Server
What are database states in SQL Server? A database is always in one specific state. For example, these states include ONLINE, OFFLINE, or SUSPECT. To verify the current state of a database, select the state_desc column in the sys.databases catalog view. The following table defines the database state...
2016-11-20, 1597🔥, 0💬

Managing Tables and Columns in SQL Server
Where to find answers to frequently asked questions on Managing Tables and Columns in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Managing Tables and Columns in SQL Server. Clear answers are provided with tutorial exercises on crea...
2016-11-20, 1579🔥, 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, 1478🔥, 0💬

System Databases Used by SQL Servers in SQL Server
What are system databases in SQL Server? System databases are created by the SQL Server itself during the installation process. System databases are used by the SQL server to help manage other user databases and client execution sessions. SQL Server 2005 Express Edition uses 4 system databases: mast...
2016-11-20, 1387🔥, 0💬

What Is a Table in SQL Server
What is a table in SQL Server? A table in database is a data object used to store data. Tables have the following features: Data is stored in a table with a structure of rows and columns. Columns must be pre-defined with names, types and constrains. A table object may have other associated data obje...
2016-11-20, 1383🔥, 0💬

SINGLE_USER/MULTI_USER - Database User Access Options in SQL Server
How to set database to be SINGLE_USER in SQL Server? Databases in SQL Server have three user access options: MULTI_USER - All users that have the appropriate permissions to connect to the database are allowed. This is the default. SINGLE_USER - One user at a time is allowed to connect to the databas...
2016-11-20, 1327🔥, 0💬

Generating CREATE TABLE Script on Existing Tables in SQL Server
How To Generate CREATE TABLE Script on an Existing Table in SQL Server? If you want to know how an existing table was created, you can use SQL Server Management Studio to automatically generate a "CREATE TABLE" script The following tutorial shows you how to do this: 1. Run SQL Server Management Stud...
2016-11-17, 2988🔥, 0💬

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, 2572🔥, 0💬

"ALTER TABLE ... DROP COLUMN" - Deleting Existing Columns in SQL Server
How To Delete an Existing Column in a Table with "ALTER TABLE ... DROP COLUMN" in SQL Server? If you have an existing column in a table and you do not need that column any more, you can delete it with "ALTER TABLE ... DROP COLUMN" statement. Here is a tutorial script to delete an existing column: AL...
2016-11-17, 2136🔥, 0💬

"sp_rename ... 'COLUMN'" - Renaming an Existing Column in SQL Server
How to rename an existing column with the "sp_rename" stored procedure in SQL Server? If you have an existing column in a table and you want to change the column name, you can use the "sp_rename ... 'COLUMN'" stored procedure. "sp_rename" allows you to change names of COLUMN, DATABASE, INDEX, USERDA...
2016-11-17, 2111🔥, 0💬

"sys.columns" - Getting a List of Columns in a Table in SQL Server
How To Get a List of Columns using the "sys.columns" View in SQL Server? If you have an existing table, but you don't remember what are the columns defined in the table, you can use the "sys.columns" system view to get a list of all columns of all tables in the current database. In order to a list o...
2016-11-17, 2107🔥, 0💬

"SELECT ... INTO" - Creating New Tables With Queries in SQL Server
How to create new tables with "SELECT ... INTO" statements in SQL Server? Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the "SELECT ... INTO" statement. The tutorial script below gives you a good exampl...
2016-11-17, 2041🔥, 0💬

"ALTER TABLE ... ADD" - Adding New Columns to Existing Tables in SQL Server
How To Add a New Column to an Existing Table with "ALTER TABLE ... ADD" in SQL Server? If you have an existing table with existing data rows, and want to add a new column to that table, you can use the "ALTER TABLE ... ADD" statement. The tutorial script below shows you a good example: ALTER TABLE t...
2016-11-17, 1908🔥, 0💬

"sp_help" - Getting a List of Columns in a Table in SQL Server
How To Get a List of Columns using the "sp_help" Stored Procedure in SQL Server? Another way to get a list of columns from a table is to use the "sp_help" stored procedure. "sp_help" returns more than just a list of columns. It returns: the table information, the column information, the identity col...
2016-11-17, 1850🔥, 0💬

"sp_columns" - Getting a List of Columns in a Table in SQL Server
How To Get a List of Columns using the "sp_columns" Stored Procedure in SQL Server? If you have an existing table, but you don't remember what are the columns defined in the table, you can use the "sp_columns" stored procedure to get a list of all columns of the specified table. The following tutori...
2016-11-17, 1606🔥, 0💬

<< < 38 39 40 41 42 43 44 45 46 47 48 > >>   ∑:1243  Sort:Rank