Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Queries creating new 3D Object with existing tags
- INSERT INTO Object3D (name, path) VALUES ('new name', 'new path');
- SELECT Id FROM Tag WHERE Name = 'MyTagName'.
- INSERT INTO Object3DTag (Object3DId, TagId) VALUES (193, 12);
- INSERT INTO Object3DTag (Object3DId, TagId) VALUES (193, 13);
- INSERT INTO Object3DTag (Object3DId, TagId) VALUES (193, 14);
- -- Queries creating new 3D Object with new tags
- INSERT INTO Object3D (name, path) VALUES ('new name', 'new path');
- INSERT INTO Tag(name) VALUES('MyTagName');
- INSERT INTO Object3DTag(Object3DId, TagId)
- VALUES (SELECT Id FROM Object3D WHERE Name = 'new name', SELECT Id FROM Tag WHERE Name = 'MyTagName'));
- -- Select the result.
- SELECT * FROM object3DTag JOIN tag ON tagId = tag.id JOIN object3D ON object3DId = object3D.id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement