Docsity

SQL Commands: Insert, Select, Update, and Delete Queries, Lecture notes of Computer Programming

Partial preview of the text

Download SQL Commands: Insert, Select, Update, and Delete Queries and more Lecture notes Computer Programming in PDF only on Docsity!

BASIC SQL COMMANDS

INSERT QUERY

Click “New Query” to show the query designer Use [Database Name] Insert into [Table Name] Values (‘[Column 1]’,’[Column 2]’,’[Column 3]’,’[Column n]’) Insert Query is used to add records to the database

SELECT QUERY

Click “New Query” to show the query designer Use [Database Name] Select [Column Name],[Column Name] from [Table Name]

SELECT QUERY

Click “New Query” to show the query designer Use [Database Name] Select * from [Table Name] where [ColumnName] = ‘[Value]’ The WHERE clause is used to filter records. In this example, we searched al records with FirstName = ‘Sample’ And LastName = ‘Test’

DELETE QUERY

Click “New Query” to show the query designer Use [Database Name] Delete from [Table Name] where [Column Name] = ‘[Value]’ Delete Query is used to delete/remove a record from the database