SQL Editor
Tables and Columns
Customer
- Id
(int)
- FirstName
(nvarchar)
- LastName
(nvarchar)
- City
(nvarchar)
- Country
(nvarchar)
- Phone
(nvarchar)
Order
- Id
(int)
- OrderDate
(datetime)
- OrderNumber
(nvarchar)
- CustomerId
(int)
- TotalAmount
(decimal)
OrderItem
- Id
(int)
- OrderId
(int)
- ProductId
(int)
- UnitPrice
(decimal)
- Quantity
(int)
Product
- Id
(int)
- ProductName
(nvarchar)
- SupplierId
(int)
- UnitPrice
(decimal)
- Package
(nvarchar)
- IsDiscontinued
(bit)
Supplier
- Id
(int)
- CompanyName
(nvarchar)
- ContactName
(nvarchar)
- ContactTitle
(nvarchar)
- City
(nvarchar)
- Country
(nvarchar)
- Phone
(nvarchar)
- Fax
(nvarchar)
Task:
Create a table with a
DATETIME
column.
Click here
for details on
DATETIME
.
CREATE TABLE DemoTable ( Id INT IDENTITY, Customer VARCHAR(100) NOT NULL, ProductName VARCHAR(100) NOT NULL, OrderDateTime DATETIME ); GO INSERT INTO DemoTable VALUES ('Harold Smith', 'Lays Chips', '2021-02-15 9:55:12'); INSERT INTO DemoTable VALUES ('Robert Johnson', 'Quaker Oats', '2021/11/08 8AM'); INSERT INTO DemoTable VALUES ('Janice Lopez', 'Oreo Cookies', '2021-05-14 13:12'); INSERT INTO DemoTable VALUES ('Kelly Wilson', 'Fritos', '2021-9-2'); INSERT INTO DemoTable VALUES ('Grace Taylor', 'Cheetos', NULL); GO SELECT * FROM DemoTable; GO DROP TABLE DemoTable; GO
Cannot use a ';' (semicolon) in this editor.
About Us
Our Story
Customers
Contact Us
FAQs
Forum
Explore Forum
Login
Join
Products
Overview
Dofactory .NET
Dofactory SQL
Dofactory JS
Dofactory Bundle
Pricing
Product Pricing
Bundle Pricing
Compare Editions
Demos
Overview
Analytics App
Ecommerce App
SaaS App
CRM App
33-Day App Factory™
Tutorials
Overview
SQL Tutorial
SQL Reference
HTML Tutorial
HTML Reference
.NET Design Patterns
C# Coding Standards
JavaScript Tutorial
Connection Strings
Visual Studio Shortcuts
C# Code Examples
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms
Privacy
Licensing
EULA
Sitemap
© Data & Object Factory, LLC.
Made with
in Austin, Texas. Vsn 1.3.0