Book Image

SQL Server on Linux

Book Image

SQL Server on Linux

Overview of this book

Microsoft's launch of SQL Server on Linux has made SQL Server a truly versatile platform across different operating systems and data-types, both on-premise and on-cloud. This book is your handy guide to setting up and implementing your SQL Server solution on the open source Linux platform. You will start by understanding how SQL Server can be installed on supported and unsupported Linux distributions. Then you will brush up your SQL Server skills by creating and querying database objects and implementing basic administration tasks to support business continuity, including security and performance optimization. This book will also take you beyond the basics and highlight some advanced topics such as in-memory OLTP and temporal tables. By the end of this book, you will be able to recognize and utilize the full potential of setting up an efficient SQL Server database solution in your Linux environment.
Table of Contents (19 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

DDL statements


DDL or Data Definition Language statements are a set of three simple but powerful and effective commands: CREATE, ALTER, and DROP. When you look at those words they do not provide you with enough information about what they are capable of doing. In a nutshell, you can do the following:

  • CREATE: This statement will create anything from the server, down to the database level of objects (database, tables, views, stored procedures, triggers, users, encryption keys, and so on)
  • ALTER: This gives you the option to modify any kind of object including server configuration and the database itself
  • DROP: This is a dangerous but effective statement for deleting (dropping is the database term) server and database level of objects

As an example, the basic syntax for creating a new table looks like this:

CREATE TABLE [table name]
( [column definitions] ) [list of parameters]

Creating a new database

Before we create some tables and other database objects we need to set up our playground. I am assuming...