Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Rename column name using 'sp_rename' command
CREATE TABLE Sales (EmpId INT, Yr INT, price MONEY) INSERT Sales VALUES(1, 2005, 12000) INSERT Sales VALUES(1, 2006, 18000) INSERT Sales VALUES(1, 2007, 25000) INSERT Sales VALUES(2, 2005, 15000) INSERT Sales VALUES(2, 2006, 6000) INSERT Sales VALUES(3, 2006, 20000) INSERT Sales VALUES(3, 2007, 24000) execute sp_rename 'Sales.Yr','Year','COLUMN' select * from Sales
run
|
edit
|
history
|
help
0
Shruti
Left join producing wrong result
get date part from datetime
SQL for beginners( defined with errors while enforcing constraints)
STACK
pk
arithmetic
Co-Related sub query
Sql flight 1
bc160402152