News

History History 55 lines (51 loc) · 1.2 KB main Breadcrumbs Database-Management-System-Lab / ...
CREATE DATABASE NEWDATABASE; CUSTOMERID INT NOT NULL IDENTITY (1,1), EMAILADDRESS VARCHAR (100) CONSTRAINT AK_CUSTOMERS_EMAILADDRESS UNIQUE, CONSTRAINT PK_CUSTOMERS_CUSTOMERID PRIMARY KEY (CUSTOMERID) ...
Then, within the Tools table, I enforce the constraint that all tool names must start with either an H or a W. Then I just create a constraint that forces WrenchingTools to start with "W".
Replace "new_table" with the name of the table to create, and replace "old_table" with the name of the table to select from. The INTO clause behaves the same as CREATE TABLE in other SQL environments.
SQL lets you use one command to quickly create a new table containing a subset of records from a larger table while working in Access. Sound complicated? It's not, as Mary Ann Richardson shows us.
Create a query from within Access that attaches to my SQL Server and retrieves the recordset. I'd likely use the same technique I applied in this thread. <BR>2.