0% found this document useful (0 votes)
13 views1 page

Lec 10 SQL Practice

The document contains SQL commands for selecting data from the Employees table and creating temporary tables (#1 and #2) to manipulate employee records. It updates the Department and Salary for a specific employee and sets the Department for another temporary table. The commands demonstrate data retrieval and modification within a database context.

Uploaded by

koulibalyhamam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

Lec 10 SQL Practice

The document contains SQL commands for selecting data from the Employees table and creating temporary tables (#1 and #2) to manipulate employee records. It updates the Department and Salary for a specific employee and sets the Department for another temporary table. The commands demonstrate data retrieval and modification within a database context.

Uploaded by

koulibalyhamam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

select * from dbo.

Employees

select * into #1 from dbo.Employees

select * from #1

update #1
set Department = 'HR'
where Department is null

update #1
set Salary = 89000,HireDate = '2023-01-01'
where EmployeeID = 7

select * from #1 where EmployeeID = 7

select * into #2 from dbo.Employees

select * from #2

update #2
set Department = 'Finance'

You might also like