الانتقال إلى المحتوى

Sql


khalid.said

Recommended Posts

chapter 1

show the structure of the Employees table.create a query to display the last name,job code,hire date,and employee number for each employee, with employee number appearing first.provide an alias startdate for the hire_date column

;desc employees

 

 

 

Run your query in the file lab_7.sql

select employee_id,last_name,job_id,hire_date "start date"

;from employees

 

 

 

 

create a query to display uniquejob codes from the employees table

select job_id

;from employees

 

 

 

 

copy the statement from lab_7 sql into the sql*plus Edit window

,#name the column headings Emp

employee,job,and hire date  respectively

"select employee_id "emp

"  last_name  "employee

"job_id  "job

"hire_date  "hire date

;from employees

 

 

 

 

 

 

Display the last name concatenated with the hob id ,separated by a comma and space and name the column employee and title

select last_name||","||job_id "employee and title"

;from employees

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية