Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
#Temp table Collation fixed
-- ///////////SCHEMA/////////////////////////////////////////////////// CREATE TABLE Animals (animal varchar(255), legs int, colour varchar(255)) ; CREATE TABLE ObjectPermissions (animal varchar(255), permission varchar(255), record int, test1 varchar(255), test2 varchar(255), test3 varchar(255) ) ; INSERT INTO Animals (animal, legs, colour) VALUES ('cat', 4, 'red'), ('bird', 2, 'yellow'), ('dog', 4, 'red'), ('deer', 4, 'red'), ('fish', 0, 'blue'), ('dingo', 4, 'yellow') ; select * from animals -- //////////////////////////////////////////////////////////////////// CREATE table #temp ( animal VARCHAR(max) COLLATE database_default, legs VARCHAR(max) COLLATE database_default, colour VARCHAR(max) COLLATE database_default ) INSERT INTO #temp (animal, legs, colour) VALUES ('fish' , 0, 'blue'), ('dog', 4, 'red'), ('Giraffe', 2, 'Orange'), ('Butterfly', 0, 'red') insert Animals (animal, legs, colour) select animal, legs, colour from #temp except select animal, legs, colour from Animals drop table #temp; select * from animals
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
t
sarthak rana
Libros
Fff
1D Hotel
TUAN 7_QUAN LY DE TAI
student table create
search all tables for string
dbray
TRANSACTIONS
Please log in to post a comment.