This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AA | |
AAH | |
AAHED | |
AAHING | |
AAHS | |
AAL | |
AALII | |
AALIIS | |
AALS | |
AARDVARK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 6.00x Problem Set 4A Template | |
# | |
# The 6.00 Word Game | |
# Created by: Kevin Luu <luuk> and Jenna Wiens <jwiens> | |
# Modified by: Sarina Canelake <sarina> | |
# | |
import random | |
import string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
namespace WordGame | |
{ | |
class MainClass | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT "column_name" | |
FROM "table_name" | |
WHERE "condition"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE "table_name" | |
SET "column_1" = [new value] | |
WHERE "condition"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM "table_name" | |
WHERE "condition"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT cus.FirstName, | |
cus.LastName | |
FROM Customer cus; | |
GO | |
/** Output **/ | |
FirstName LastName | |
---------------------------------------- ---------------------------------------- | |
Paolo Accorti | |
Pedro Afonso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF NOT EXISTS(SELECT 1 FROM sys.tables WHERE name = 'table_name') | |
CREATE TABLE "table_name"( | |
"column 1" "data type for column 1" [column 1 constraint(s)], | |
"column 2" "data type for column 2" [column 2 constraint(s)], | |
... | |
[table constraint(s)] | |
); | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF NOT EXISTS(SELECT 1 FROM sys.tables WHERE name = 'Customer') | |
CREATE TABLE Customer( | |
Id INT IDENTITY, | |
FirstName NVARCHAR(40) NOT NULL, | |
LastName NVARCHAR(40) NOT NULL, | |
City NVARCHAR(40) NULL, | |
Country NVARCHAR(40) NULL, | |
Phone NVARCHAR(20) NULL, | |
CONSTRAINT PK_CUSTOMER PRIMARY KEY(Id) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Adding constraint to an existing table **/ | |
ALTER TABLE Customer ADD CONSTRAINT PK_ORDER PRIMARY KEY(Id); | |
GO |
OlderNewer