SQL Tutorial 8: The Select Query

  Рет қаралды 20,222

G C Reddy Software Testing

G C Reddy Software Testing

Күн бұрын

SQL Select Query examples, Create a Database, Create a Table, Enter Some Records into the Table, Write select Statement to fetch all Records from a table, Write a Select statement to fetch some columns from a table, SQL Where Clause, write condition in Select Statements using Where clause, and write multiple conditions in Select statements using where clause & SQL Logical operator like And & Or.

Пікірлер: 13
@gcreddy
@gcreddy 7 жыл бұрын
Class Notes: SQL Tutorial 8: The Select Query The SQL SELECT statement is used to fetch the data from a database table which returns this data in the form of a result table. These result tables are called result-sets. The basic syntax of the SELECT statement is as follows - SELECT column1, column2, columnN FROM table_name; SELECT * FROM table_name; Note: If you want to use/Practice Select statements then we must have at least one table with some records... Step 1: Create a Database Create Database gcreddy; Step 2: Create a Table Before Create a table first Use/Select database... Create table abcd( Id int, Name varchar(50), Age int, City varchar(50), ); Step 3: Enter Some Records into that Table then execute select statements... Insert Into abcd (ID, Name, Age, City) values (1, 'Ramesh', 32, 'Pune'), (2, 'Venkat', 25, 'Chennai'), (3, 'Suma', 25,'Hyderabad'), (4, 'Bhasha', 23, 'Delhi'), (5, 'David', 27, 'Hyderabad'); ------------------- SQL> SELECT Id, Name, City FROM abcd; It will return all te records of abcd table with ID, Name, and City fields only… SQL> SELECT * FROM abcd; It will return all the records of Customers table SQL -Where Clause The SQL WHERE clause is used to specify a condition while fetching the data from a single table or by joining with multiple tables. The WHERE clause is not only used in the SELECT statement, but it is also used in the UPDATE, DELETE statement, etc., Syntax: SELECT column1, column2, columnN FROM table_name WHERE [condition] You can specify a condition using the comparison or logical operators like >, 25; Select ID, Name, Age, City From abcd Where Name ='David'; AND and OR Conjunctive Operators: The SQL AND & OR operators are used to combine multiple conditions to narrow data in an SQL statement. The AND Operator--- Syntax: SELECT column1, column2, columnN FROM table_name WHERE [condition1] AND [condition2]...AND [conditionN]; Examples: Select ID, Name, City From abcd Where Id >2 And Age > 25; Select * From abcd Where Id>2 And Age>=25; The OR Operator: Syntax: SELECT column1, column2, columnN FROM table_name WHERE [condition1] OR [condition2]...OR [conditionN] Example: Select Id, Name, City From abcd Where Id>2 Or Age>25;
@venkats4879
@venkats4879 7 жыл бұрын
sir I need join inner join outer join and full join
@vaka.mani07
@vaka.mani07 7 жыл бұрын
Sir, when will you upload all tutorial videos regarding SQL? Thanks for your tutorial training
@nithinsrinivasan3686
@nithinsrinivasan3686 6 жыл бұрын
thaks sir for sharing your knowledge
@gcreddy
@gcreddy 6 жыл бұрын
Welcome
@BhuvanaSaravanan
@BhuvanaSaravanan 7 жыл бұрын
Thanks for this section and really helpful .
@gcreddy
@gcreddy 7 жыл бұрын
Welcome
@alexschmidt4371
@alexschmidt4371 4 жыл бұрын
The actual SELECT query starts at 18:05 You can thank me later because I am dying right now
@sreeyash123
@sreeyash123 6 жыл бұрын
Sir,can u please provide the notes for this video
@wsglobal2023
@wsglobal2023 6 жыл бұрын
so this was basically recap of tutorial 1 to 7..
@gowrir611
@gowrir611 7 жыл бұрын
Sir where is tutorial 7 ?
@vijayasowmya7357
@vijayasowmya7357 6 жыл бұрын
i want compound operators
@alexschmidt4371
@alexschmidt4371 4 жыл бұрын
play in 1.5 speed >> you can thank me later Edited: 1.5 is still slow try out 1.75
SQL Tutorial 9: SQL Joins
30:26
G C Reddy Software Testing
Рет қаралды 28 М.
SQL Tutorial 2: Overview of SQL
40:34
G C Reddy Software Testing
Рет қаралды 69 М.
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 1,1 МЛН
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 10 МЛН
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 1,4 МЛН
Learn SQL in 1 Hour - SQL Basics for Beginners
1:02:23
Joey Blue
Рет қаралды 3,6 МЛН
SQL Crash Course - Beginner to Intermediate
58:39
Traversy Media
Рет қаралды 850 М.
SQL Tutorial for Beginners
44:57
Kevin Stratvert
Рет қаралды 2,1 МЛН
Introduction to SQL | SQL Tutorial for Beginners | G C Reddy |
32:51
G C Reddy Software Testing
Рет қаралды 222 М.
SQL Tutorial 4: Database Fundamentals, and SQL Language Elements
1:11:49
G C Reddy Software Testing
Рет қаралды 52 М.
SQL Tutorial 10: SQL Functions
45:44
G C Reddy Software Testing
Рет қаралды 38 М.
SQL - Data Definition Language
1:57:41
G C Reddy Software Testing
Рет қаралды 43 М.