How to Modify Names in an SQL View?
- Thread starter WWGD
- Start date
-
- Tags
- Sql
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 1K views
Discussion
Physics news on Phys.org
Mentor
- 15,798
- 10,684
Do you want to change the name of the SQL view? or change the column names?
What database are you using?
http://en.wikipedia.org/wiki/View_(SQL)
I think you just delete the view and then recreate with your changes.
Here's one example using the ALTER command:
http://dba.fyicenter.com/faq/sql_server/ALTER_VIEW_Modifying_Existing_Views.html
What database are you using?
http://en.wikipedia.org/wiki/View_(SQL)
I think you just delete the view and then recreate with your changes.
Here's one example using the ALTER command:
http://dba.fyicenter.com/faq/sql_server/ALTER_VIEW_Modifying_Existing_Views.html
avarmaavarma
- 16
- 0
You need to use 'ALTER VIEW' e.g.
ALTER VIEW HumanResources.EmployeeHireDate
AS
SELECT p.FirstName, p.LastName, e.HireDate
FROM HumanResources.Employee AS e JOIN Person.Person AS p
ON e.BusinessEntityID = p.BusinessEntityID
WHERE HireDate < CONVERT(DATETIME,'20020101',101) ;
GO
ALTER VIEW HumanResources.EmployeeHireDate
AS
SELECT p.FirstName, p.LastName, e.HireDate
FROM HumanResources.Employee AS e JOIN Person.Person AS p
ON e.BusinessEntityID = p.BusinessEntityID
WHERE HireDate < CONVERT(DATETIME,'20020101',101) ;
GO
Similar threads
How to modify Adaline Stochastic gradient descent
- vokoyo
- · Replies 1 ·
- Programming and Computer Science
- Replies
- 1
Python How to Modify Python Dice Rolling Game to Accept User Input for Number of Rolls?
- jdawg
- · Replies 17 ·
- Programming and Computer Science
- Replies
- 17
How to Modify Vector Elements to Double Values Less Than a Minimum?
- needOfHelpCMath
- · Replies 3 ·
- Programming and Computer Science
- Replies
- 3
Fortran How to Modify a FORTRAN Program to Exclude Multiples of 5?
- Nicolaus
- · Replies 1 ·
- Programming and Computer Science
- Replies
- 1
Appliances How to modify a rotary pencil sharpener to sharpen off-center leads?
- Stephen Tashi
- · Replies 2 ·
- DIY Projects
- Replies
- 2
How do I open and view MDF and LDF files in SQL Server 2005?
- ionlylooklazy
- · Replies 1 ·
- Programming and Computer Science
- Replies
- 1
How to modify the following code?
- winiepu
- · Replies 3 ·
- Programming and Computer Science
- Replies
- 3
How to Modify Fourier's Heat Conduction Equation for a Finite Body?
- debjit625
- · Replies 2 ·
- Advanced Physics Homework Help
- Replies
- 2
MATLAB How to Modify Contour Colors in MATLAB?
- eahaidar
- · Replies 1 ·
- MATLAB, Maple, Mathematica, LaTeX
- Replies
- 1
How to Modify PNP BJT Voltages in Multisim 13 Simulation?
- etf
- · Replies 1 ·
- Electrical Engineering
- Replies
- 1